Pixel sorting in C | Sololearn: Learn to code for FREE!

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

4/19/2022 1:19:49 PM

Heyy

3 Answers

New Answer

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.