[Bug 298265] New: Embedded preview changes from full to reduced size regardless album view settings

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

[Bug 298265] Embedded preview changes from full to reduced size regardless album view settings

Bugzilla from varun.herale@gmail.com
https://bugs.kde.org/show_bug.cgi?id=298265

--- Comment #21 from Varun Herale <[hidden email]> ---
Created attachment 70490
  --> https://bugs.kde.org/attachment.cgi?id=70490&action=edit
Proposed patch

Hello,

I have made some modifications to previewtask.cpp. After testing with test
cases, everything seems to work fine. Attaching the proposed patch.

--
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 298265] Embedded preview changes from full to reduced size regardless album view settings [patch]

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

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Embedded preview changes    |Embedded preview changes
                   |from full to reduced size   |from full to reduced size
                   |regardless album view       |regardless album view
                   |settings                    |settings [patch]

--- Comment #22 from Gilles Caulier <[hidden email]> ---
Varun,

Can you explain a little bit your fixes please ?

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 298265] Embedded preview changes from full to reduced size regardless album view settings [patch]

Bugzilla from varun.herale@gmail.com
In reply to this post by GPSanino
https://bugs.kde.org/show_bug.cgi?id=298265

--- Comment #23 from Varun Herale <[hidden email]> ---
(In reply to comment #22)
> Varun,
>
> Can you explain a little bit your fixes please ?
>
> Gilles Caulier

Gilles,

Using gdb I found that the image is previewed properly whenever it is loaded
using "load()" function of DImg class before painting from -

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/libs/widgets/graphicsview/graphicsdimgitem.cpp#L191

This happens only in certain cases where QImage to DImg conversion is done -

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/master/entry/libs/threadimageio/previewtask.cpp#L261

So I added another line to load after the conversion is done. This change
affects only during preview of images.

Varun Herale

--
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 298265] Embedded preview changes from full to reduced size regardless album view settings [patch]

Bugzilla from varun.herale@gmail.com
In reply to this post by GPSanino
https://bugs.kde.org/show_bug.cgi?id=298265

--- Comment #24 from Varun Herale <[hidden email]> ---
Marcel,

The image data stored while copying from QImage to DImg is for some reason not
the expected data. But this conversion seems to work for all other cases except
this one - so I didn't want try any changes to this. That is why I wrote lines
to load directly from the file instead of from QImage.

Where do you think the problem is ? Is this because QImage has wrong data ?

Varun Herale

--
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 298265] Embedded preview changes from full to reduced size regardless album view settings [patch]

Marcel Wiesweg
In reply to this post by GPSanino
https://bugs.kde.org/show_bug.cgi?id=298265

--- Comment #25 from Marcel Wiesweg <[hidden email]> ---
Varun: Have you been able to reproduce the problem with the dolphin image given
above? I dont really see a difference between the preview and the same image
opened in the editor.
As we have switched to full-size preview, the second code path is relevant.
As this is a JPEG, apparently the source of the QImage must be the preview,
lines 307ff. That cannot really be the case, the preview in the image is
clearly smaller then the current (deliberate) threshold of 0.48. Or is a
preview loaded by KDCRaw in the lines below???

--
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 298265] Embedded preview changes from full to reduced size regardless album view settings [patch]

Bugzilla from varun.herale@gmail.com
In reply to this post by GPSanino
https://bugs.kde.org/show_bug.cgi?id=298265

--- Comment #26 from Varun Herale <[hidden email]> ---
Created attachment 70520
  --> https://bugs.kde.org/attachment.cgi?id=70520&action=edit
Image displayed wrongly

Marcel,

Please check with the image that I am attaching. This is one of the images with
which I can reproduce the problem. For this image - the preview is not smaller
than the threshold.. and only in these cases the problem is seen.

So when this preview is copied into QImage and then converted to DImg -> the
preview is not displayed correctly.

Varun Herale

--
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 298265] Embedded preview changes from full to reduced size regardless album view settings [patch]

Bugzilla from varun.herale@gmail.com
In reply to this post by GPSanino
https://bugs.kde.org/show_bug.cgi?id=298265

--- Comment #27 from Varun Herale <[hidden email]> ---
Marcel,

Also, how come when certain images are edited their embedded previews are
retained whereas if certain other images are edited their embedded previews are
lost ? I don't get this part.

It looks like for the images where embedded previews are retained -> they still
represent original image. That is why there is this problem.

Varun Herale

--
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 298265] Embedded preview changes from full to reduced size regardless album view settings [patch]

Marcel Wiesweg
In reply to this post by GPSanino
https://bugs.kde.org/show_bug.cgi?id=298265

--- Comment #28 from Marcel Wiesweg <[hidden email]> ---
The attached image is quite clearly broken: It contains a preview which is
larger than the files itself; obviously the file was cropped and the preview
not removed. This is not a bug of the preview mechanism.

--
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 298265] Embedded preview changes from full to reduced size regardless album view settings [patch]

Bugzilla from varun.herale@gmail.com
In reply to this post by GPSanino
https://bugs.kde.org/show_bug.cgi?id=298265

--- Comment #29 from Varun Herale <[hidden email]> ---
Yes Marcel, the problem is not with the preview mechanism.

But this image was created after editing with the imageeditor, so the problem
is with the imageeditor ? Also, I have tried editing some images of my own..
And none seem to retain their preview except these images.

Varun Herale

--
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 298265] Embedded preview changes from full to reduced size regardless album view settings [patch]

Bugzilla from varun.herale@gmail.com
In reply to this post by GPSanino
https://bugs.kde.org/show_bug.cgi?id=298265

--- Comment #30 from Varun Herale <[hidden email]> ---
Marcel,

Since the camera used is Nikon, the embedded preview with tag
"Exif.Nikon3.Preview" seems to be stored.

But in the code, only Iptc Previews are deleted -

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

This is the root cause of problem here I think. The function can be changed to
delete any tag with "preview" in it.. but is it right way to go ?

Varun Herale

--
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 298265] Embedded preview changes from full to reduced size regardless album view settings [patch]

Marcel Wiesweg
In reply to this post by GPSanino
https://bugs.kde.org/show_bug.cgi?id=298265

Marcel Wiesweg <[hidden email]> changed:

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

--- Comment #31 from Marcel Wiesweg <[hidden email]> ---
This is true.
Andreas: We use exiv2's PreviewManager facilities to load previews. When
editing and image and saving it, we need to remove the previews which show the
previous contents. Currently, we remove
Iptc.Application2.Preview*, Exif.SubImage1 tags for TIFFs and use ExifThumb to
erase that one.
Looking at the source, PreviewManager supports a much wider range including
proprietary tags to extract previews. Is there a way to safely delete them
(except for copying the current tag list from preview.cpp)?

--
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 298265] Embedded preview changes from full to reduced size regardless album view settings [patch]

Bugzilla from ahuggel@gmx.net
In reply to this post by GPSanino
https://bugs.kde.org/show_bug.cgi?id=298265

--- Comment #32 from Andreas Huggel <[hidden email]> ---
Ideally, the Exiv2 PreviewManager should support delete and set preview
operations where possible. However, when it comes to RAW images I'm not sure if
that's always safe. Some of these previews may be considered an integral part
of the image structure.

--
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 298265] Embedded preview changes from full to reduced size regardless album view settings [patch]

Marcel Wiesweg
In reply to this post by GPSanino
https://bugs.kde.org/show_bug.cgi?id=298265

--- Comment #33 from Marcel Wiesweg <[hidden email]> ---
For our purposes, we only care about images which we create; because only when
the image data is altered the old preview is invalid. That means we have
ExifData, XmpData etc. in memory and need to edit them, removing all traces of
invalid previews.
So for now, we probably need to get a list of proprietary tags like the Nikon
one mentioned above and remove them?

--
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 298265] Embedded preview changes from full to reduced size regardless album view settings [patch]

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

--- Comment #34 from GPSanino <[hidden email]> ---
Created attachment 71630
  --> https://bugs.kde.org/attachment.cgi?id=71630&action=edit
Corrupted preview after using Editor on a file created by nikon D3000

Hi,
after the latest update I thought the bug was completely resolved. However, I
just had the same problem again, associated to photos taken with a Nikon D3000.
Maybe this camera stores the preview in a different way?
I am attaching a file as a sample of the problem after using the Editor for
cropping and saving, the preview got corrupted.

thanks for the great work!
gps

--
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 298265] Embedded preview changes from full to reduced size regardless album view settings [patch]

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

--- Comment #35 from Gilles Caulier <[hidden email]> ---
Official digiKam 2.6.0 release is out since few days now :

http://www.digikam.org/drupal/node/656

Please, check if this entry still valid, or update report accordingly.

Thanks in advance.

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 298265] Embedded preview changes from full to reduced size regardless album view settings [patch]

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

--- Comment #36 from GPSanino <[hidden email]> ---
Hi Gilles,

I have tried to install 2.6.0 but no luck.  The Build Service only finds
it under the Factory/snapshot repository, but after the one click
install I get an error message: "valid metadata not found at specified
URL / Repository type can't be determined".
I tried downloading the RPM manually but I get dependencies not
satisfied (libtiff....).
From Digikam's website I get t the same opensuse's built service. I
guess I have to wait some time for these installation issues to be
solved before to install 2.6.0 and check the images that I get wrong if
I try to edit them with Digikam's editor.  Not many though.  This app is
great in so many ways.

Thanks, and I will keep you informed,
gps

On 06/22/2012 04:53 AM, Gilles Caulier wrote:

> https://bugs.kde.org/show_bug.cgi?id=298265
>
> --- Comment #35 from Gilles Caulier <[hidden email]> ---
> Official digiKam 2.6.0 release is out since few days now :
>
> http://www.digikam.org/drupal/node/656
>
> Please, check if this entry still valid, or update report accordingly.
>
> Thanks in advance.
>
> 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 298265] Embedded preview changes from full to reduced size regardless album view settings [patch]

Marcel Wiesweg
In reply to this post by GPSanino
https://bugs.kde.org/show_bug.cgi?id=298265

--- Comment #37 from Marcel Wiesweg <[hidden email]> ---
Andreas, I think you need to help us with that a bit.
We dont need any PreviewManager extension, we have an ExifData object in memory
here and need to strip it.

There's a bunch of makernotes which I'd simply remove. Some of them can be
found in
static const PreviewTags filteredPvTags[] in exif.cpp, some more seem to be in
const LoaderExifDataJpeg::Param LoaderExifDataJpeg::param_[] in preview.cpp.

We remove any trace of Exif.SubImage[1-4].*

I'm unsure about the relevance of these (from preview.cpp):

        { "Exif.Image.JPEGInterchangeFormat",    
"Exif.Image.JPEGInterchangeFormatLength",     0 }, // 0
"Exif.SubThumb1.JPEGInterchangeFormatLength", 0 }, // 5
        { "Exif.Image2.JPEGInterchangeFormat",  
"Exif.Image2.JPEGInterchangeFormatLength",    0 }, // 6
        { "Exif.Image.StripOffsets",              "Exif.Image.StripByteCounts",
                0 }, // 7
        { "Exif.OlympusCs.PreviewImageStart",    
"Exif.OlympusCs.PreviewImageLength",          "Exif.MakerNote.Offset"}  // 8

and

        { "Image",     "Exif.Image.NewSubfileType",     "1" },  // 0
        { "Thumbnail", 0,                               0   },  // 6
        { "Image2",    0,                               0   }   // 7

--
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 298265] Embedded preview changes from full to reduced size regardless album view settings [patch]

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

--- Comment #38 from Gilles Caulier <[hidden email]> ---
Marcel,

What's about patch proposed in this file by Varun ?

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
|

[digikam] [Bug 298265] Embedded preview changes from full to reduced size regardless album view settings [patch]

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

--- Comment #39 from Gilles Caulier <[hidden email]> ---
Andreas,

Do you see the previous comment from Marcel ?

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
|

[digikam] [Bug 298265] Embedded preview changes from full to reduced size regardless album view settings [patch]

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

--- Comment #40 from Gilles Caulier <[hidden email]> ---
Varun,

Can you update your patch against current git/master implementation ?

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
123