"Peter Pimley" on  wrote...
| 
| Hi Anthony,  Thanks for your information.
| 
| > 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.
| 
| OK, that's what I'm looking for :)
|  
| > See IM Examples, Quantization and transparency.
| >   http://www.imagemagick.org/Usage/quantize/#color_trans
| 
| Yes, that's concrete proof of what you said.  It's doing exactly what I
| want, but with PNGs.
| 
| > 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'.
| 
| My experience is that when IM saves a TGA, it saves one of the
| following:
| 
| 1) 32 bit 
| 2) 24 bit
| 3) 8 bit indecies into a 24 bit palette
| 
| Taking alpha_gradient.png from the example page you gave me:
| 
| $ convert alpha_gradient.png alpha_gradient.tga
| produces a 32 bit TGA which looks exactly like the PNG
| 
| $ convert alpha_gradient.png +matte alpha_gradient.tga
| produces a 24 bit TGA, discarding the alpha channel
| 
| $convert alpha_gradient.png -colors 256 alpha_gradient.tga
| produces a 8 bit index / 24 bit palette TGA.  The image is opaque
| 
| Up until now, one of the three above has always been what I've needed,
| so I've never had a problem before.  But what I'm trying to persuade it
| to do now is to save 8 bit indexed into a 32 bit palette.  I've been
| reading through the TGA format spec
| http://www.dca.fee.unicamp.br/~martino/disciplinas/ea978/tgaffs.pdf and
| it sounds like it ought to be possible (see "Color Map Specification").
| Do you think that's worthy of a bug report / feature request?
| 
| If not, what I'll end up doing is the following:
| 
| convert {source} -colors 256 -type TrueColor output.tga
| (which produces a 32 bit TGA with alpha values, up to 256 unique 32-bit
| values in the image)
| 
| ... and then write my own code to move the colors from the image into
| the palette.
| 
| Do you have any opinions?
| 
You can always put in a BUG report/ feature request on the IM bugs
forum.   Detail the above in that request.

However all of the developers are always very busy, and a new feature is
often pushed to the end of a very very long 'to do' list.

It may be better for you to try to look at the source and see if you can
add it yourself.

I have no idea who wrote the TGA code, probably was done quite a long
time ago.  8-bit indexed TGA with 32 colors is probably not something
they really thought about.

First however try to find out if it is actually posible. A link to an
example of what is actually wanted would also help.

Im must not only be able to write it, but it needs to read it too.

  Anthony Thyssen ( System Programmer )    <[EMAIL PROTECTED]>
 -----------------------------------------------------------------------------
  UNIX is the spawn of the devil,
       why he even has his deamons running the thing!    -- Anthony Thyssen
 -----------------------------------------------------------------------------
     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

Reply via email to