[Digikam-users] Comments in png files

Paweł Marciniak pave at o2.pl
Mon Nov 12 17:26:51 GMT 2007


Gilles Caulier wrote:

> 2007/11/5, Paweł Marciniak <pave at o2.pl>:
>>
>> Thank you Gilles for replying!
>>
>> Gilles Caulier wrote:
>> > Exiv2 do not support yet PNG metadata for writting. Patch still
>> uncomplete
>> > on my computer.
>> > [...]
>> > yes, Caption, date, rating, and tags are store in digiKam database.
>>
>> I see. Is there a way (it may even involve some hacking) to retrieve the
>> captions from db and embed them in jpeg files? Otherwise it's A LOT of
>> rewriting for me :(
> 
> 
> But al is always done by digiKam. Are you sure to have set on right right
> options in Metadata setup dialog page ?

Actually, this is a bug. I filed it already:
http://bugs.kde.org/show_bug.cgi?id=152208

>>> When converting manually with convert, no error is raised, but when I
>>> try
>>
>> >> to
>> >> view the converted image in digiKam, no metadata is shown at all.
>> >
>> > Exif and iptc ??? Impossible (:=))). All my photo collection are in PNG
>> > (taken originally from JPEG or RAW), and metadata still present of
>> course.
>> >
>> > Witch camera you use ? Can you send me a JPEG file taken with your
>> camera
>> > to test. How are you converted your JPEG files to PNG ? Using Camera
>> > interface during download ?
>>
>> Yes, there's nothing after opening the photo in digiKam (display(1),
>> however, sees exif metadata in the jpeg, but not iptc). I found out that
>> the digiKam console says:
>>
>> 8<-------------------------------------
>> Warning: IPTC dataset Iptc.Application2.Preview has invalid size 67904;
>> skipped.
> 
> 
> This is the problem. Preview (an embeded and reduced JPEG image) is set by
> digiKam in IPTC to speed up preview loading (F4).
> 
> problem is than preview IPTC can be larger than 64Kb (see iptc/iim paper)
> and a jpeg section (used to embeded iptc in jpeg file) is limited to 64Kb.
> Ther eis no size limitattion with PNG (or TIFF)

OK, thanks A LOT for that pointer! It allowed me to find a workaround by
removing the iptc sections from png files with `convert +profile iptc`, and
then seamlessly (well, not really, see the above bug) finishing the work
with digiKam.

> I have already fixed the problem in digiKam core, Exiv2 but not yet in
> kipi-plugins. Of course i will do it.
> 
> Note : it's originally a problem of imagemagick wich trunk whole iptc if
> size is over 64 kb during PNG=>JPEG (or TIFF=>JPEG)
> 
> Please make a file in bugzilla, in kipi-plugins/BatchProcess component.

I filed it. But IMHO digiKam core doesn't perform as expected either. When I
tried to convert png->jpeg by "save as..." in image editor, I got:
Cannot save metadata using Exiv2  (Size of IPTC JPEG segment is larger than
65535 bytes)
on the console, what means that it in fact recognized the problem, but the
result is that the resulting image is stripped from BOTH iptc and exif
metadata. I think a better way of handling this would be to strip just the
iptc section (exactly what I did with IM's convert). Is this a bug then?

> Thanks in advance
No, Thanks to YOU :)

Pawel




More information about the Digikam-users mailing list