[Bug 307277] New: digikam corrupts MPO (3D pictures produced by the Fujifilm W3 camera) files when attempting to rotate them during import

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

[Bug 307277] New: digikam corrupts MPO (3D pictures produced by the Fujifilm W3 camera) files when attempting to rotate them during import

Vadim
https://bugs.kde.org/show_bug.cgi?id=307277

            Bug ID: 307277
          Severity: critical
           Version: 3.0.0
          Priority: NOR
          Assignee: [hidden email]
           Summary: digikam corrupts MPO (3D pictures produced by the
                    Fujifilm W3 camera)  files when attempting to rotate
                    them during import
    Classification: Unclassified
                OS: Linux
          Reporter: [hidden email]
          Hardware: Ubuntu Packages
            Status: UNCONFIRMED
         Component: Import
           Product: digikam

The Fujifilm W3 3D camera is a compact camera that takes 3D photos. It uses the
MPO format. It is documented at:
http://www.cipa.jp/english/hyoujunka/kikaku/pdf/DC-007_E.pdf

The format is an extension of JPEG, and as such it works fine in applications
that read it. However writing it properly requires understanding the
extensions.

The problem is twofold:

1. Digikam doesn't correctly write back the file, and corrupts it
2. It shouldn't be doing that anyway, as the 3D effect only works in the
orientation it was taken -- 3D images can't be rotated. Rotation of 3D pictures
should never be done automatically. If Digikam permits rotating 3D images by
user request, the user should be given a warning.





Reproducible: Always

Steps to Reproduce:
1. Take picture on Fujifilm W3 3D camera (or any other camera using the MPO
format)
2. Import in digikam. If digikam reports it's rotating the file, it will be
broken. Corrupted files can be detected by grepping for 'digiKam'
3. Upload the file back to the camera.
Actual Results:  
Camera will report an error if attempting to display it. In the thumbnail view,
the image will be visible, but broken files will only have 2D thumbnails.


Expected Results:  
File should be copied from the camera/card unmodified, for the above explained
reasons.

A 3D camera isn't required to test this bug. Sample MPO files can be obtained
for instance at http://3dporch.com/

Since MPO files can't be rotated meaningfully, simply leaving the file
untouched is an acceptable fix.

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

[Bug 307277] digikam corrupts MPO (3D pictures produced by the Fujifilm W3 camera) files when attempting to rotate them during import

Gilles Caulier-4
https://bugs.kde.org/show_bug.cgi?id=307277

Gilles Caulier <[hidden email]> changed:

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

--- Comment #1 from Gilles Caulier <[hidden email]> ---
This is something new about MPO files type...

We must ignore this format in rotation code.  Very easy...

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/libs/jpegutils/jpegutils.cpp#L668

Note : to be homogeneous, some others code need to be patched in this way :

https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/entry/jpeglossless/plugin/utils.cpp#L197

Smit, it's an easy bug report... Did you manage it ?

Gilles Caulier

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

[Bug 307277] digikam corrupts MPO (3D pictures produced by the Fujifilm W3 camera) files when attempting to rotate them during import

Smit Mehta
In reply to this post by Vadim
https://bugs.kde.org/show_bug.cgi?id=307277

--- Comment #2 from Smit Mehta <[hidden email]> ---
Hi Gilles

Just to be sure, the function isJpeg should return false, if it sees MPO files,
correct?

Mimetype of an MPO file says JPEG only. I will get the extension from the
filename. Is that fine? Or should I do anything else?

Smit

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

[Bug 307277] digikam corrupts MPO (3D pictures produced by the Fujifilm W3 camera) files when attempting to rotate them during import

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

--- Comment #3 from Gilles Caulier <[hidden email]> ---
>Just to be sure, the function isJpeg should return false, if it sees MPO files, correct?

Yes.

>Mimetype of an MPO file says JPEG only. I will get the extension from the filename. Is that fine? Or should I do anything else?

yes. Look how it's do in libkexiv2 for ex. :

https://projects.kde.org/projects/kde/kdegraphics/libs/libkexiv2/repository/revisions/master/entry/libkexiv2/kexiv2_p.cpp#L105

... we use this way to check if Raw file extension are supported in writing
mode...

Gilles Caulier

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

[Bug 307277] digikam corrupts MPO (3D pictures produced by the Fujifilm W3 camera) files when attempting to rotate them during import

Smit Mehta
In reply to this post by Vadim
https://bugs.kde.org/show_bug.cgi?id=307277

--- Comment #4 from Smit Mehta <[hidden email]> ---
Git commit 2dde7e718f98db683d9c255bee4093302ca21d73 by Smit Mehta.
Committed on 25/09/2012 at 14:04.
Pushed by smitmehta into branch 'master'.

Adding .MPO file as an exception. Its a 3D extension of JPEG which is not
supposed to be rotated.

M  +14   -1    jpeglossless/plugin/utils.cpp

http://commits.kde.org/kipi-plugins/2dde7e718f98db683d9c255bee4093302ca21d73

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

[Bug 307277] digikam corrupts MPO (3D pictures produced by the Fujifilm W3 camera) files when attempting to rotate them during import

Smit Mehta
In reply to this post by Vadim
https://bugs.kde.org/show_bug.cgi?id=307277

Smit Mehta <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
      Latest Commit|                            |http://commits.kde.org/digi
                   |                            |kam/f5ed9bdcf6729fdbdc15f1b
                   |                            |eecd61b8d0856a5b0

--- Comment #5 from Smit Mehta <[hidden email]> ---
Git commit f5ed9bdcf6729fdbdc15f1beecd61b8d0856a5b0 by Smit Mehta.
Committed on 25/09/2012 at 14:06.
Pushed by smitmehta into branch 'master'.

Adding MPO format as an exception. It is a 3D extension of jpeg which is not
supposed to be rotated.

M  +7    -2    libs/jpegutils/jpegutils.cpp

http://commits.kde.org/digikam/f5ed9bdcf6729fdbdc15f1beecd61b8d0856a5b0

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

[Bug 307277] digikam corrupts MPO (3D pictures produced by the Fujifilm W3 camera) files when attempting to rotate them during import

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

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Version Fixed In|                            |3.0.0

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