chaiNNer icon indicating copy to clipboard operation
chaiNNer copied to clipboard

Crop to absolute size (with anchor)

Open simolg opened this issue 9 months ago • 9 comments

Motivation I have many images with multiple resolutions (therefore multiple aspect ratios), I would like a function that cuts automatically these images to a fixed size.

Description I don't know the initial aspect ratio of each images I can't calculate the every edges; therefore the crop node will have to cut "automatically" to a "fixed" size keeping each image centered (or other types of anchors)

generalizing:

  • if the image are wider you will have to cut the left and right edges
  • if the image are taller you will have to cut the upper and lower edges
  • if the image is totally different you must cut all edges

on the contrary:

  • if the canvas needs to be larger, borders must be added

Alternatives paint.net has a similar function (canvas size), which is very useful, let's call it an "advanced automatic crop" ;)

simolg avatar Jun 03 '24 15:06 simolg