Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13980
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 Smile 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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: StreamRaster::LoadAnyFile -- not exist in distribution?
Next Topic: Draw Objects with Wallpapers, ...
Goto Forum:
  


Current Time: Sun May 19 20:00:19 CEST 2024

Total time taken to generate the page: 0.01251 seconds