[Digikam-devel] [Bug 150801] Thumbnail and image view does not update after editing image

Gilles Caulier caulier.gilles at gmail.com
Mon Nov 19 13:49:08 GMT 2007


For details, look code on method loadJPEGScaled() from this file :

http://websvn.kde.org/branches/extragear/kde3/graphics/digikam/libs/jpegutils/jpegutils.cpp?revision=711981&view=markup

Gilles

2007/11/19, Gilles Caulier <caulier.gilles at gmail.com>:
>
>
>
> 2007/11/19, Paweł Marciniak <pave at o2.pl>:
> >
> > Gilles Caulier wrote:
> >
> > > Thanks to point me over this problem... but libkexiv2 is not the right
> > > place to fix it.
> > >
> > > The bug is in editor... Look at this file:
> >
> > You're right - That solves it. I must have missed that place.
> >
> > But don't you think it would be better to remove the preview only if it
> > really is > 64 KiB? Many of my png files (blue sky etc. ;)) have preview
> > that fits in JPEG tag and I presume it's always good to preserve it. I
> > mean
> > something like:
> >
> >
> > // Optimistically update IPTC preview
> > meta.setImagePreview(preview);
> >
> > if ( mimeType.upper() == QString("JPG") || mimeType.upper() ==
> > QString("JPEG") || mimeType.upper () == QString("JPE"))
> > {
> >     if (meta.getIptcTagData("Iptc.Application2.Preview").size() > 65536)
> >     {
> >         // JPEG file, we remove too big IPTC preview.
> >         meta.removeIptcTag ("Iptc.Application2.Preview");
> >         meta.removeIptcTag("Iptc.Application2.PreviewFormat");
> >         meta.removeIptcTag("Iptc.Application2.PreviewVersion");
> >     }
> > }
> >
> >
> > What do you think?
>
>
> Pawel,
>
> It's not necessary for JPEG because libjpeg provide a way to decode a
> reduced version of really image very quickly. This is not the case of PNG
> and TIFF library. This is why Preview is important for these formats.
>
> Best
>
> Gilles
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20071119/6e2a5d1d/attachment.html>


More information about the Digikam-devel mailing list