Skip to content

Does it do upscaling ? and what about center fit cropping ? #130

@fahadzafar

Description

@fahadzafar

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions