View Single Post
Old 18 April 2015, 22:04   #10
Newbie Amiga programmer

Join Date: Jun 2012
Location: Front of my A500+
Age: 32
Posts: 109
Originally Posted by Mrs Beanbag View Post
Personally i'd like to be able to incorprate a PNG loader into some of my own code, albeit nothing so sophisticated as yours.
There is libPNG, it's open source, you can use it both trough library calls, or just incorporating the code.
Originally Posted by Mrs Beanbag View Post
I have wondered before about the best way of doing this, but then i don't really know how colour quantization works anyway. Maybe there is another cunning trick one could use... thinking cap time!
I didn't invent the wheel. My quantization code is heavily based on Xiaolin Wu's at here:
I had to rewrite the whole code, to be able to use the algorithm as a function and also i thrown out the color replacing, because the euclidean color searching was more efficient, and i have added the ability to quantize to EHB or 12-bit and also to get the resulting image as a stream of lookup indexes; but the palette quantizer's algorithm - which is responsible for finding the best colours - is remained the same.

Last edited by TCH; 18 April 2015 at 22:07. Reason: comma => semicolon
TCH is offline  
Page generated in 0.04903 seconds with 10 queries