Bug 197619 - Make inverse perspective transform not crop images
Summary: Make inverse perspective transform not crop images
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Editor-Perspective (show other bugs)
Version: 1.0.0
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2009-06-23 16:01 UTC by Benjamin Traut
Modified: 2019-02-24 10:34 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Traut 2009-06-23 16:01:27 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

Currently the inverse perspective transform of the perspective adjustment tool crops the image to the selected rectangle.
This makes it less usefull for correcting photographs.
I would like to see at least two options here:

[X] Inverse transformation
  (o) Do not crop
  ( ) Crop to selected rectagle
  ( ) Crop to valid part (<-- this might not be well definable, since there are many ways of cropping the resulting image)
Comment 1 caulier.gilles 2009-06-23 16:16:00 UTC
David,

What do you think about this entry ?

Gilles Caulier
Comment 2 David Nolden 2009-06-23 17:19:29 UTC
What would "crop to valid parts" mean? Otherwise, yes I think that the first two options would be useful.

Although to be really correct, the image size would even have to be increased in some cases, like the rotation tool does.
Comment 3 Benjamin Traut 2009-06-23 17:39:42 UTC
(In reply to comment #2)
> What would "crop to valid parts" mean? Otherwise, yes I think that the first
> two options would be useful.

When you apply a perspective transformation to an image, you get black parts where there weren't any pixels which were transformed.
With "crop to valid parts" I meant, that the algorithm should try to crop to a rectangle which lies inside the image and does not cover any of those invalid, black areas.
Since there are many ways of defining such a rectangle, it might be usefull to have this algorithm make an initial guess (e.g. make a valid rectangle which resembles the aspect ratio of the image) that could be used as an input for the crop tool.
Hence "this might not be well definable, since there are many ways of cropping the resulting image".
To sum it up, I really do not know whether option 3 is an improvement or not.

> Although to be really correct, the image size would even have to be increased
> in some cases, like the rotation tool does.

Yes, the size of the image has to be recalculated.
Comment 4 Mikolaj Machowski 2009-06-23 18:19:36 UTC
Another solution: Copy interface from Free rotation - identical widget, similar results, less thinking for user which is always good thing.

In Free Rotation there is drop-down menu for Auto-crop option: None, Widest Area, Largest Area. Additional option - Highest area  - does it make sense?