i want to upscale images, then fit them to certain dimensions, I'm okay with cropping loss at the edges, but i want to maintain the aspect ratio and center the image. Asking this because i read in the doc, that cropping happens starting top left.
currently im doing this to a test image of 1200x1800
convert test.png -resize 1300x1300^ -gravity center -extent 1300x1300 -quality 100 converted_not.jpg
i just wana do it in code. Some clarification would be most appreciated.
thanks