extragear/graphics/digikam/imageplugins/freerotation

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

extragear/graphics/digikam/imageplugins/freerotation

Bugzilla from andi.clemens@gmx.net
SVN commit 1038521 by aclemens:

Do not set the newSize to -1 of no rotation has been applied, but set the
original size.

These labels are still wrong and (for me) not really needed. If you rotate an
image, it will show the newSize of the previewed image data, not the original
one.
This is actually wrong, because the size doesn't represent the real outcome.

I would suggest to remove those labels completely, but I guess this should be
discussed before ;-)

So what do you think?

CCMAIL:[hidden email]

 M  +4 -2      freerotationtool.cpp  


--- trunk/extragear/graphics/digikam/imageplugins/freerotation/freerotationtool.cpp #1038520:1038521
@@ -462,8 +462,10 @@
     d->previewWidget->updatePreview();
     QSize newSize = dynamic_cast<FreeRotation *>(filter())->getNewSize();
     QString temp;
-    d->newWidthLabel->setText(temp.setNum( newSize.width()) + i18n(" px") );
-    d->newHeightLabel->setText(temp.setNum( newSize.height()) + i18n(" px") );
+    int new_w = (newSize.width()  == -1) ? w : newSize.width();
+    int new_h = (newSize.height() == -1) ? h : newSize.height();
+    d->newWidthLabel->setText(temp.setNum(new_w)  + i18n(" px") );
+    d->newHeightLabel->setText(temp.setNum(new_h) + i18n(" px") );
 }
 
 void FreeRotationTool::putFinalData(void)
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: extragear/graphics/digikam/imageplugins/freerotation

Gilles Caulier-4
2009/10/21 Andi Clemens <[hidden email]>:

> SVN commit 1038521 by aclemens:
>
> Do not set the newSize to -1 of no rotation has been applied, but set the
> original size.
>
> These labels are still wrong and (for me) not really needed. If you rotate an
> image, it will show the newSize of the previewed image data, not the original
> one.
> This is actually wrong, because the size doesn't represent the real outcome.
>
> I would suggest to remove those labels completely, but I guess this should be
> discussed before ;-)

It can easy to compute real size if you know dim factor between
preview and original ?

Gilles
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: extragear/graphics/digikam/imageplugins/freerotation

Bugzilla from andi.clemens@gmx.net
Yes, could be easy, but what is the purpose of those labels anyway?
Ok, I'm only speaking for me, but why would I want to know the new size of the
rotated image?
I would not rotate an image, and then decide to abort the rotation because the
image got too big ;-)

But if we want to keep it, I can recalculate the size for sure.

Andi
On Wednesday 21 October 2009 12:53:20 Gilles Caulier wrote:

> 2009/10/21 Andi Clemens <[hidden email]>:
> > SVN commit 1038521 by aclemens:
> >
> > Do not set the newSize to -1 of no rotation has been applied, but set the
> > original size.
> >
> > These labels are still wrong and (for me) not really needed. If you
> > rotate an image, it will show the newSize of the previewed image data,
> > not the original one.
> > This is actually wrong, because the size doesn't represent the real
> > outcome.
> >
> > I would suggest to remove those labels completely, but I guess this
> > should be discussed before ;-)
>
> It can easy to compute real size if you know dim factor between
> preview and original ?
>
> Gilles
> _______________________________________________
> Digikam-devel mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-devel
>
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel