Image adjustment after cropping
Sven Langkamp
sven.langkamp at gmail.com
Sat Feb 2 20:10:03 UTC 2013
On Fri, Feb 1, 2013 at 5:14 AM, Dmitry Kazakov <dimula73 at gmail.com> wrote:
>
>> Actually I kind of liked it that way as the cropped area does stay
>> exactly where it was and it doesn't jump to a centered position.
>
>
> Yes, I like that too... I'm not sure I can tell right know how it can be
> done easily. It will probably demand a bit of changes to the set of image
> signals, KisSignalVector, KisSignalsRouter and the KisProcessingApplicator
> classes. The problem is the signals emitted by the processing applicator
> cannot have a parameter (they are effectively a vector of enums). This
> should be solved somehow.
>
> Probably, we should emit some signal like:
>
> void sigImageSizeChanged(QRectF oldImageRect)
>
> where \p oldImageRect would show which rect in new image pixels is occupied
> by the old image.
>
> For example:
> 1) Old Image: 300x300
> 2) We crop it by 100,100 200x200
> 3) Then oldImageRect would be -100,-100 300x300.
>
> The problem is, I cannot tell what the oldImageRect value should be when we
> rotate or shear the image...
>
> What do you think of such interface?
It doesn't need a parameter for crop. The change in the patch just
needs to know when the new image to widget transformation is active.
In the other cases we don't need to match the image exactly, I think.
More information about the kimageshop
mailing list