Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quality slightly drops with each operation #36

Open
kirillt opened this issue Apr 10, 2023 · 1 comment
Open

Quality slightly drops with each operation #36

kirillt opened this issue Apr 10, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@kirillt
Copy link
Member

kirillt commented Apr 10, 2023

Crop and rotate operations cause quality to slightly drop and this effect accumulates.
Both of these operations must just accumulate some matrix transformation without actual render (except preview).

Rendering must happen only during saving into a file. During this final rendering, all operations must be applied at once if possible. It might be difficult to "sandwich" operations without loss of quality, e.g. crop, rotate, crop. But if possible to represent such a heterogeneous sequence of operations as a single matrix transformation, that would be perfect.

Sequences like crop, crop, crop or rotate, rotate, rotate always can be reduced to a single operation.

Example 1 (original image is 100x100):

crop(10,10,20,20)
crop(5,5,10,10)

is the same as

crop(15,15,20,20)

Example 2:

rotate(90 degrees)
rotate(-10 degrees)
rotate(40 degrees)
rotate(-20 degrees)

is the same as

rotate(100 degrees)
@kirillt kirillt added the enhancement New feature or request label Apr 10, 2023
@kirillt
Copy link
Member Author

kirillt commented Apr 29, 2023

Example with rotation operation:

blurr.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant