0
Pixel sorting in C
How can I sort pixels of a BMP image based on average value of R+G+B (or any other sorting criteria) by rows? Examples would be helpful
3 Antworten
0
But I am not allowed to use library functions, I need to write an algorithm and then optimise it
+ 2
https://stackoverflow.com/questions/1787996/c-library-function-to-perform-sort
With a barebones sorting function and your custom predicate fn that gives the avg.
0
If you're not allowed to use premade functions I assume you first have to manually build a BMP file parser and then place all pixels in a buffer and manually iterate, qsort is obsolete.