Re: Euphoria vs Python vs Go vs Rust
- Posted by petelomax Jul 02, 2019
- 1306 views
This only works on ppm files:
https://rosettacode.org/wiki/Percentage_difference_between_images#Phix
This will load a png and extract the pixels (but do something else with them):
https://rosettacode.org/wiki/Color_quantization#Phix
Note that (my) im_pixel() routine only works on IM_RGB so it uses imImageRemoveAlpha() as a work-around.
Between the two of them, and a fixed im_pixel(), should be everything you need.
Actually, writing a brand new im_get_all_pixels() would probably be better and much faster, as well as sidestep the im_pixel() bug.