Image processing based on mouse position and different window size

Hell everyone,

I am completely new to processing and I’m following the tutorials series. I am at “Images and pixels” tutorial and I made the “Adjusting image brightness” exercise which is based on mouse position.
My question is, how do I do this, on a window with different size than the image(let’s say 500 x 500). I tried different things like removing the loadPixels() function and let just the img.loadPixels(). The same thing I did for updatePixels and img.updatePixels() but it didn’t work. Maybe I didn’t understand very well, the working with the pixels on the window/image.

A little help please ?

Than you very much!

1 Like

Welcome!

Please link to the tutorial you are following, and post a sketch with something specific you tried that isn’t working. That will make it much easier for people to understand your problem and give you concrete advice.

Also, please be much more specific than “but it didn’t work”. Briefly say what you expected to happen, and what happened instead. If you got an error message, cut and paste the actual literal error message. This helps us help you.