I am writing an image viewer. I want to be able to resize the image so
that it always fits within a window of given height and width.
I've tried a couple of these from the web, but the don't seem to take
into account both the image dimensions AND the window dimensions.
Are there any algorithms out there? I'm not keen on reinventing the
wheel here.
that it always fits within a window of given height and width.
I've tried a couple of these from the web, but the don't seem to take
into account both the image dimensions AND the window dimensions.
Are there any algorithms out there? I'm not keen on reinventing the
wheel here.
Comment