[digikam] [Bug 342931] New: Wrong apect ratio in item properties and in item view

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

[digikam] [Bug 342931] New: Wrong apect ratio in item properties and in item view

Stas
https://bugs.kde.org/show_bug.cgi?id=342931

            Bug ID: 342931
           Summary: Wrong apect ratio in item properties and in item view
           Product: digikam
           Version: 4.6.0
          Platform: Kubuntu Packages
                OS: Linux
            Status: UNCONFIRMED
          Severity: minor
          Priority: NOR
         Component: general
          Assignee: [hidden email]
          Reporter: [hidden email]

Hello, I have found that in item properties and also when showing the aspect
ratio in the icon view, the aspect ratio is always 3:2. The search option works
however. So it is a error in displaying the ratio.

I have researched a little bit in the code and have found the error:
in: /core/libs/imageproperties/imagepropertiestab.cpp
line: 949
in function: ImagePropertiesTab::aspectRatioToString()
the following can be found: doubleToHumanReadableFraction((double)nw /
(double)nh, &num, &den);
however the function doubleToHumanReadableFraction has 4 parameters.
Changing it to: doubleToHumanReadableFraction((double)nw / (double)nh, &num,
&den, 10);
solves the problem both in item properties and in icon view.

I would wish that you change it in the next version or on git. But I do not
know whether 10 is the best parameter here.

Thanks for great software anyway.

Reproducible: Always

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 342931] Wrong apect ratio in item properties and in item view

Maik Qualmann
https://bugs.kde.org/show_bug.cgi?id=342931

Maik Qualmann <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #1 from Maik Qualmann <[hidden email]> ---
Created attachment 90494
  --> https://bugs.kde.org/attachment.cgi?id=90494&action=edit
aspectratio.patch

I think a value of 4 is enough with this function. Here is the patch.

Maik

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 342931] Wrong apect ratio in item properties and in item view

Gilles Caulier-4
In reply to this post by Stas
https://bugs.kde.org/show_bug.cgi?id=342931

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED
   Version Fixed In|                            |4.7.0
      Latest Commit|                            |http://commits.kde.org/digi
                   |                            |kam/76eee521045ad6d577a08c7
                   |                            |afec292d8b1d99a0e

--- Comment #2 from Gilles Caulier <[hidden email]> ---
Git commit 76eee521045ad6d577a08c7afec292d8b1d99a0e by Gilles Caulier.
Committed on 18/01/2015 at 17:25.
Pushed by cgilles into branch 'master'.

apply patch #90494 from Maik Quallmann to limit decimal precision to show
aspect ratio value on image properties and icon-view.
FIXED-IN: 4.7.0

M  +2    -2    libs/imageproperties/imagepropertiestab.cpp
M  +1    -1    libs/imageproperties/imagepropertiestab.h

http://commits.kde.org/digikam/76eee521045ad6d577a08c7afec292d8b1d99a0e

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 342931] Wrong apect ratio in item properties and in item view

Gilles Caulier-4
In reply to this post by Stas
https://bugs.kde.org/show_bug.cgi?id=342931

--- Comment #3 from Gilles Caulier <[hidden email]> ---
Git commit 68d118a6b7a87632cc11d6e2b7e65c878d9ebc19 by Gilles Caulier.
Committed on 18/01/2015 at 17:30.
Pushed by cgilles into branch 'frameworks'.

backport commit #76eee521045ad6d577a08c7afec292d8b1d99a0e from git/master to
frameworks branch

M  +1    -1    libs/imageproperties/imagepropertiestab.cpp

http://commits.kde.org/digikam/68d118a6b7a87632cc11d6e2b7e65c878d9ebc19

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 342931] Wrong apect ratio in item properties and in item view

Stas
In reply to this post by Stas
https://bugs.kde.org/show_bug.cgi?id=342931

Stas <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
            Version|4.6.0                       |4.8.0
   Version Fixed In|4.7.0                       |
         Resolution|FIXED                       |---

--- Comment #4 from Stas <[hidden email]> ---
Hello, I have found out that the value of 4 is not enough for this function.
With this value videos are shown to be 7:4 and not 16:9. Please check that and
change the value (I have 10 but please think of what value is needed to get all
"standard" aspect ratios right).

Thanks

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 342931] Wrong apect ratio in item properties and in item view

Maik Qualmann
In reply to this post by Stas
https://bugs.kde.org/show_bug.cgi?id=342931

--- Comment #5 from Maik Qualmann <[hidden email]> ---
Created attachment 91495
  --> https://bugs.kde.org/attachment.cgi?id=91495&action=edit
aspectratio2.patch

Yes Stas, I have not previously it with 16: 9 tested, we increase to 10. Thank
you!

Maik

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 342931] Wrong apect ratio in item properties and in item view

Maik Qualmann
In reply to this post by Stas
https://bugs.kde.org/show_bug.cgi?id=342931

Maik Qualmann <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #90494|0                           |1
        is obsolete|                            |

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 342931] Wrong apect ratio in item properties and in item view

Gilles Caulier-4
In reply to this post by Stas
https://bugs.kde.org/show_bug.cgi?id=342931

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
   Version Fixed In|                            |4.9.0
                 CC|                            |[hidden email]

--- Comment #6 from Gilles Caulier <[hidden email]> ---
Git commit 52dc2861efca3d8deda9fe20fefc46e85029e484 by Gilles Caulier.
Committed on 08/03/2015 at 20:13.
Pushed by cgilles into branch 'master'.

apply patch #91495 from Maik Qualmann to fix apect ration computation in image
properties with 16:9 rounding

M  +2    -1    NEWS
M  +1    -1    libs/imageproperties/imagepropertiestab.cpp

http://commits.kde.org/digikam/52dc2861efca3d8deda9fe20fefc46e85029e484

diff --git a/NEWS b/NEWS
index 1d5e9a0..8190592 100644
--- a/NEWS
+++ b/NEWS
@@ -11,5 +11,6 @@ BUGFIXES FROM KDE BUGZILLA
(https://www.digikam.org/changelog):
 003 ==> 338753 - Exif ImageDescription field is being used incorrectly.
 004 ==> 330224 - Add collection from network share is silently ignored
[patch].
 005 ==> 344699 - Maintenance is using the wrong face data management [patch].
-006 ==>
+006 ==> 342931 - Wrong apect ratio in item properties and in item view.
+007 ==>

diff --git a/libs/imageproperties/imagepropertiestab.cpp
b/libs/imageproperties/imagepropertiestab.cpp
index 203ee47..9be90bc 100644
--- a/libs/imageproperties/imagepropertiestab.cpp
+++ b/libs/imageproperties/imagepropertiestab.cpp
@@ -946,7 +946,7 @@ bool ImagePropertiesTab::aspectRatioToString(int width, int
height, QString& arS
     }

     long   num=0, den=0;
-    doubleToHumanReadableFraction((double)nw / (double)nh, &num, &den, 4);
+    doubleToHumanReadableFraction((double)nw / (double)nh, &num, &den, 10);

     const QString awidth  = QString::number(num);
     const QString aheight = QString::number(den);

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 342931] Wrong apect ratio in item properties and in item view

Gilles Caulier-4
In reply to this post by Stas
https://bugs.kde.org/show_bug.cgi?id=342931

--- Comment #7 from Gilles Caulier <[hidden email]> ---
Git commit 74d1dbdb08874cb3649f59c6c08cedeb79741f29 by Gilles Caulier.
Committed on 08/03/2015 at 20:16.
Pushed by cgilles into branch 'frameworks'.

backport commit #52dc2861efca3d8deda9fe20fefc46e85029e484 from git/master to
frameworks branch

M  +2    -2    libs/imageproperties/imagepropertiestab.cpp

http://commits.kde.org/digikam/74d1dbdb08874cb3649f59c6c08cedeb79741f29

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 342931] Wrong apect ratio in item properties and in item view

bugzilla_noreply
In reply to this post by Stas
https://bugs.kde.org/show_bug.cgi?id=342931

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|general                     |Metadata-Engine

--
You are receiving this mail because:
You are the assignee for the bug.