"Peter Pimley" on wrote... | Hello IM people, | | I'm in the following situation: | | I have a "full fat" 32-bit non-indexed TGA file. | | This file might have more than 256 unique 32-bit values in it. I'd | like to reduce that to a TGA so that it has no more than 256 unique | 32-values. Then I'd like to save it with 8-bit entries into a 32-bit | palette. | | What makes my situation possibly unusual is that I want the alpha | channel to be treated in exactly the same way as R,G and B in this | process. If two colors differ only in their alpha channel, they still | count as two seperate colors in my problem domain. In fact, the | pixels in the images I'm converting differ almost ONLY in the alpha | channel (i.e. they're nearly all the same "color", but with different | "alpha"). |
By default IM treats transparent and semi-transparent colors as just another color. However two years ago a change was may so as to make full-transparent any-color mean the same thing. EG transparent-black is also transparnet white. The other effect is that near transparent colors are thought to be a lot closer together than opaque colors. See IM Examples, Quantization and transparency. http://www.imagemagick.org/Usage/quantize/#color_trans This is the default. The only time this changes is when IM auto saves to formats such as GIF and PNG8. As for TGA. No one has reported in the list or forums what IM does for these images, and if or how it handles 'indexed TGA'. | I've tried various combinations of -quantize, -colors, -type Palette / | PaletteMatte, etc. But the output TGA is always opaque. When I load | the output TGA into a hex editor, the Color map entry field (i.e. the | eighth byte of the TGA) is always 24, where I want 32. | If the image is opaque, (no alpha channel) the output is generally opaque (no alpha). if this is not what is happening report a bug on the IM Bugs Forum with examples of the problem. | Can anybody tell me what the | -treat-alpha-channel-just-like-the-other-three flag is? ;) | That is the default! Or at least it should be for TGA. Anthony Thyssen ( System Programmer ) <[EMAIL PROTECTED]> ----------------------------------------------------------------------------- "When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up." -- C.S. Lewis ----------------------------------------------------------------------------- Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/ _______________________________________________ Magick-users mailing list [email protected] http://studio.imagemagick.org/mailman/listinfo/magick-users
