Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » saving a paletted PNG
Re: saving a paletted PNG [message #6088 is a reply to message #6080] |
Mon, 30 October 2006 07:33   |
 |
mirek
Messages: 14256 Registered: November 2005
|
Ultimate Member |
|
|
OK, I see 3 possible solution:
* Quick fix, without altering U++, little bit ugly
See PalleteCv class, Get. As you are able to set any palette to RasterEncoder, it is possible, based on PalleteCv conversion, to build special palette and
RGBA PaletteIndex(int index);
that will force those shifted values to produce specific index. Later I would add this to U++. Would be a bit slow, but not extremely slow.
* Indexed mode in PaletteCv and/or RasterFormat
Alter conversion routines to use some channel (most likely R as direct palette index. E.g. by using (PaletteCv *)1 in Write
* Perfect but complicated solution
Well, this one already happened in Raster - add support for Raw modes in RasterEncoder (RasterEncoder::WriteLine(byte *data)). This is far the most work and paradigm shift too.
Right now I would vote for the first option, in the same time I am afraid that last option would be nice to have too. But these are orthogonal.
Mirek
|
|
|
Goto Forum:
Current Time: Thu May 01 19:08:05 CEST 2025
Total time taken to generate the page: 0.01014 seconds
|