I wondered if you could point me in the right direction with this....
I want to take a number of images (with different dimensions) fit a given template / canvas but keeping it's height / width ratio and without losing any quality.
I have tried using the ResizeHeightRatio() / ResizeWidthRatio() functions but although the resulting image seems reduced (in terms of pixel size), GetHeightmm() and GetWidthmm() still return the same dimensions of the original image. The resulting image also has a small DPI count.
Lets say I have an Image that is 1000 pixels wide x 1000 pixels high (300 DPI) and I want to make it fit an area / canvas of 800w x 600h....i.e. the resulting image would need to be 600 x 600, centered (i.e 200 pixels white space at either side)
I think instead I need to possibly create a new image with the correct dimensions and then shrink the original to fit inside the new canvas using DrawImage().
Is this correct?
Resize image on to new canvas
Re: Resize image on to new canvas
Hi,
Yes, it is the best way
Let me know if you need an example.
Kind regards,
Loïc
Code: Select all
I think instead I need to possibly create a new image with the correct dimensions and then shrink the original to fit inside the new canvas using DrawImage().
Let me know if you need an example.
Kind regards,
Loïc
Who is online
Users browsing this forum: Google [Bot] and 1 guest