Home » Extra libraries, Code snippets, applications etc. » C++ language problems and code snippets » Inverse palette conversion algorithm...
Re: Inverse palette conversion algorithm... [message #2308 is a reply to message #2306] |
Fri, 07 April 2006 13:33   |
 |
mirek
Messages: 14267 Registered: November 2005
|
Ultimate Member |
|
|
mr_ped wrote on Fri, 07 April 2006 07:16 | 1) why to use indexed color? (ok, sometimes it's still really needed, but usually 32b ARGB is the way to go)
2) so you speeded up 20 times code which is run single time during init and takes under 100ms even with brute-force algorithm, and you needed 3 days to do that.
2 - related) in case you generate the conversion table more than one time, there's something fishy about that. (and looks like you can speed up the thing much more just by omiting multiple initialization of the same table)
|
Add 1) Yes, of course, that is BTW the main motivation why I completely refactor U++ Images now. HOWEVER, for certain applications, palette images are still needed. E.g. webserver could need to generate .gifs based on some RGBA data and this algorithm has to be part of it (and would limit the speed of webserver significantly; "brute force" algorithm spend 100ms on 2.4Ghz AMD64 machine, that simply was unacceptable).
Also, believe it or not, another motivation is that at least two of our existing applications deal with images that simply do not fit into memory even when indexed - e.g. nice 256 color, 32768x32768 pixels - >1GB of data. If you want to deal with such beasts, you need to have some nice tools to do so (of course speed of inverse transformation does not matter here).
2) You have to generate such table for each used palette. And each time you are about to save RGBA image in indexed format, you need to generate such inverse transformation cube.
(And sure, there is always "because I can" factor 
Mirek
|
|
|
 |
|
Inverse palette conversion algorithm...
By: mirek on Wed, 05 April 2006 10:11
|
 |
|
Re: Inverse palette conversion algorithm...
By: mr_ped on Fri, 07 April 2006 10:05
|
 |
|
Re: Inverse palette conversion algorithm...
By: mirek on Fri, 07 April 2006 11:16
|
 |
|
Re: Inverse palette conversion algorithm...
By: mr_ped on Fri, 07 April 2006 13:23
|
 |
|
Re: Inverse palette conversion algorithm...
By: mirek on Fri, 07 April 2006 13:34
|
 |
|
Re: Inverse palette conversion algorithm...
By: mr_ped on Fri, 07 April 2006 13:16
|
 |
|
Re: Inverse palette conversion algorithm...
By: mirek on Fri, 07 April 2006 13:33
|
 |
|
Re: Inverse palette conversion algorithm...
By: mr_ped on Fri, 07 April 2006 17:30
|
 |
|
Re: Inverse palette conversion algorithm...
By: mr_ped on Fri, 07 April 2006 17:46
|
 |
|
Re: Inverse palette conversion algorithm...
By: mirek on Sat, 08 April 2006 14:00
|
 |
|
Re: Inverse palette conversion algorithm...
By: mr_ped on Mon, 10 April 2006 17:58
|
 |
|
Re: Inverse palette conversion algorithm...
By: mr_ped on Sun, 21 May 2006 15:40
|
 |
|
Re: Inverse palette conversion algorithm...
By: mr_ped on Sun, 21 May 2006 15:46
|
 |
|
Re: Inverse palette conversion algorithm...
By: mirek on Sun, 21 May 2006 16:01
|
Goto Forum:
Current Time: Thu Aug 28 12:02:08 CEST 2025
Total time taken to generate the page: 0.11899 seconds
|