chaiNNer-org / chaiNNer

A node-based image processing GUI aimed at making chaining image processing tasks easy and customizable. Born as an AI upscaling application, chaiNNer has grown into an extremely flexible and powerful programmatic image processing application.
https://chaiNNer.app
GNU General Public License v3.0
4.49k stars 280 forks source link

Define a new aspect ratio of the canvas #2936

Open simolg opened 3 months ago

simolg commented 3 months ago

Motivation

Starting from an image I want to define an arbitrary appearance of the canvas (4:3, 21:9, 1:1 .. or any other aspect ratio)

Description

The new hypothetical node could adapt the image (without deforming it) to the new appearance they cut automatically the horizontal or vertical edges

start image (in this example 16:9): example_16-9

by setting "4:3" in the new hypothetical node: example_4-3

by setting "21:9" in the new hypothetical node: example_21-9

in practice the new node should choose the best cut to adapt to the new format, if aspect ratio is greater or less than the aspect ratio of the origin, it will choose the side to cutting.