This project has moved and is read-only. For the latest updates, please go here.

Resizing & Padding

Sep 10, 2016 at 12:32 AM
How exactly does the Resize() Method work? Is it Width x Height in pixels? Whenever I try to do something like... image.Resize(800,800) the output is not exactly as expected. The output file size is for example 395 x 800, I would assume it be 800 x 800. Also is there a similar method to add padding/whitespace to an image? For example, if the image is 555px x 1000px, I would like to make it 1000 x 1000 in which the width gets additional 445 px of whitespace equally.

Sep 10, 2016 at 12:51 AM
Well I wished I would've read the documentation better about the resize method. I was able to figure it out!
Sep 10, 2016 at 1:12 AM
Is it possible to center an image?

I am using image.Scale(800,800) and image.Extent(800,800) and doing so, the image is to the far left.
Sep 10, 2016 at 12:47 PM
I am guessing that you want to extent your image that is 395x800 to 800x800. You can use extent for that and if you choose the overload that has a gravity you can center the image with Gravity.Center.
Sep 13, 2016 at 5:12 PM
Thank you very much. I was looking for that overload.