Thread: Color wrong
View Single Post
Old 27 March 2014, 14:01   #8
thomas
Registered User
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 6,048
Quote:
Icons are just (struct Image *) images, same as a picture.
No.

This is only true for OS 3.1 and below built-in icons. And similar to your internal images, they look differently on each user's palette.

Beginning with NewIcons the .info file is extended with an (undocumented) part which contains image data as well as palette data. Newicon.library transparently remaps the image into the screen's palette and pokes the remapped image into the struct Image pointed to by the struct DiskObject. But this remapped struct Image is a different one than that stored in the .info file. And the pens only stay valid until you FreeDiskObject() the icon.

In OS 3.5 icon.library was extended so that you can access the new image/palette part with OS functions. In OS 4.0 the new part was extended to understand 32bit images, too. These are not supported by OS 3.9 and below.


Quote:
Icon.library uses datatypes.library for 8bit and 32bit, yes?
No. It contains its own code to load and remap images from .info files.
thomas is offline  
 
Page generated in 0.04502 seconds with 11 queries