View Single Post
Old 19 April 2015, 23:57   #15
Newbie Amiga programmer

Join Date: Jun 2012
Location: Front of my A500+
Age: 32
Posts: 109
Originally Posted by Cylon View Post
Is the alpha channel preserved? If yes, how?
If by preserving you mean it is stored into the ILBM as it was, then the answer is of course no, since the ILBM does not support alpha. However, the alpha channel is not ignored; the program renders a 24-bit image from every type of PNG, including alpha channeled ones - the alpha channel defines the mixing ratio of the foreground and background colours. Try it with an alpha channeled PNG. If the PNG does not have a background colour, then the program defines it as black, but you can overwrite the background color, with the "fb" switch.
Originally Posted by pandy71 View Post
Well, from my perspective it seem to be obvious that as AGA and OCS/ECS use different bitdepth then different approach to create CLUT is necessary.
Going for 12 bit allow avoid losing some CLUT entries.
Unfortunately this is not true in this case, because the quantizer works on full 24-bit, so even if i convert the image to have only "symmetric" channel values ($ee, $55, $11, $99, etc.), the palette quantizer will generate colours which are not symmetric and we're at where we begun.
Originally Posted by pandy71 View Post
I see - this will be question - not sure if this approach is correct - perhaps it should be like - reduce pixel level by half, count optimal 32 CLUT (half bright)?
Yes, the correct method would be choosing only bright colours, because the dark ones will be generated (your reverse way works too, choose the secondary dark colours, then generate the primary bright palette) - however intensify or reduce the image's brightness can cause information loss, because of over or undersaturation. There could be some method to prevent this, but i am not a mathematician, the algorithm of the quantizer is done by Mr. Wu twenty years before, i just know what it does, but do not know why it works.
Originally Posted by pandy71 View Post
Side to this i hope You are aware of this new class of algorithms:
Probably they are to slow for native Amiga but for modern CPU they provide splendid results.
I am aware of them; i tried them before and they gave much worse results, than Mr. Wu's quantizer.
Originally Posted by pandy71 View Post
And Thank You Very Much!
You are welcome.
TCH is offline  
Page generated in 0.04606 seconds with 10 queries