I have a simple app that loops through some pictures
What I want is to give relative (to screen resolution) coordinates and have the program position the image in such a way that the its horizontal dimension fits exactly the screen and the proportions are maintained intact in respect to the image’ s resolution
I want to make my app able to playback in other computers that would have different screen resolutions and keep the image proportions intact
float ratio = img.getWidth()/img.getHeight();
img.draw(ofGetWidth(),ofGetWidth()/ratio);
in case ratio<1 (width<height) the image will be partially shown actually. in that case you can adjust it to the height of the screen doing the opposite calculation.
Newbie/artist here. I’m not having success with drawing images and scaling them to the screen while keeping the image ratio. I made a little app to isolate the problem. It seems the image is being drawn to the bottom and right of the screen(?).