ARK-Builders / ARK-Builders/Retouch

Quality slightly drops with each operation

Open
#36 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Kotlin
Stars
4
Forks
2
PR merge metrics
No merged PRs in 30d

Description

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)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing where crop and rotate operations are applied, how preview rendering differs from saving, and where the final image is rendered. Compare repeated crop and rotate sequences with their equivalent combined transformations, then verify that saving applies the operations together without cumulative quality loss.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
computer-graphics, mobile
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.