SDL Image Filtering

Solved thanks for info!!

Look at it. That loop doesn't actually alter the image anywhere; it never uses the values of rsum, ... for anything at all.

Also, it doesn't ever reset the values of rsum, ... it just keeps adding forever.

Solved

in what way does it "fail"?

Solved

Where are these R, G, B arrays defined? You don't show enough of your code. There's certainly not enough there for me to do any testing...

Thx done already!!

You might want to try tackling this in parts rather than slaping the whole giant thing together as one glob and hoping it works. Use a tiny test image, print out some values, calculate by hand the values you should be getting, print the values you ARE getting, etc.

code for a putpixel function: Graphics and Video
code for a getpixel function, including unmapping rgb: www.remram44.c.la - Tutoriaux pour le C++ et SDL

1 Like

Hey thx I go check it out!!