Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Struggling with the Icon File format.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-04-2007, 04:05 PM
RandomCoder's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire, UK
Posts: 623
Awards Showcase
Beta Tester 
Total Awards: 1
Default Struggling with the Icon File format.

To better understand the Icon File format I've modified Erel's code to read an icon file and store what was read in a TextBox.
I've then copied this to Excel and sorted the data into its corresponding sections, i.e. Entries, InfoHeader, Color etc.

This has helped me to understand how the file is built but I'm struggling to make sense of the XOR-bitmap/AND-Bitmap data.
Does each Byte represent the index of the color in the color table
So a value of 25 would be referring to the 25th color listed in the color table?

I'm presuming that each Byte represents a single pixel and I understand that the pixels are in reverse order which frankly just complicates things even further

Any help would be greatly appreciated!

Thanks,
RandomCoder.
__________________
"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote
  #2 (permalink)  
Old 08-04-2007, 06:20 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,734
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The XOR bitmap is used for the transparency pattern only.
In the AND bitmap, each byte represents the color in the color table as you've written.
Reply With Quote
  #3 (permalink)  
Old 08-04-2007, 07:05 PM
RandomCoder's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire, UK
Posts: 623
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by Erel View Post
The XOR bitmap is used for the transparency pattern only.
In the AND bitmap, each byte represents the color in the color table as you've written.
Thank you Erel, I thought that I had understood correctly.
Guess this means that I have to give my palette an index now, I was hoping to just store the RGB values for each pixel in the order that they are used to create the icon. Back to the drawing board again

Regards,
RandomCoder
__________________
"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add a image/icon to the Setup file ? mozaharul Questions (Windows Mobile) 1 09-16-2008 04:33 PM
Need a format to write large .dat file with numbers Stellaferox Questions (Windows Mobile) 4 02-04-2008 01:16 AM
Exe embedded data file and, Icon personalisation. dan kabestan Questions (Windows Mobile) 3 01-15-2008 11:08 AM
Format of file "SQLDesktop.dll" is invalid. Peter Bug Reports 2 05-03-2007 10:58 AM


All times are GMT. The time now is 10:57 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0