After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 619921 - TagLib# does not support PNG
TagLib# does not support PNG
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: Metadata
GIT
Other All
: Normal normal
: 0.7.1
Assigned To: F-spot maintainers
F-spot maintainers
: 622099 (view as bug list)
Depends on: 619920
Blocks: 618683
 
 
Reported: 2010-05-28 09:32 UTC by Mike Gemünde
Modified: 2010-06-19 17:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
JpegComment need not to be terminated by 0 (1.35 KB, patch)
2010-05-28 09:32 UTC, Mike Gemünde
none Details | Review
Add some properties which are usefull for image tags (15.90 KB, patch)
2010-05-28 09:32 UTC, Mike Gemünde
none Details | Review
Add more flexible PropertyModificationValidator (9.35 KB, patch)
2010-05-28 09:32 UTC, Mike Gemünde
none Details | Review
Add Test to ensure that the ImageTag properties work correctly (6.85 KB, patch)
2010-05-28 09:32 UTC, Mike Gemünde
none Details | Review
Add Function which ensures that all possible image tags for an image file are in place (1.35 KB, patch)
2010-05-28 09:32 UTC, Mike Gemünde
none Details | Review
Remove CommentTest for jpeg test without metadata (1.32 KB, patch)
2010-05-28 09:32 UTC, Mike Gemünde
none Details | Review
Create class ImageBlockFile for image files organized with data blocks (33.10 KB, patch)
2010-05-28 09:32 UTC, Mike Gemünde
none Details | Review
Introduce support for PNG files (37.33 KB, patch)
2010-05-28 09:32 UTC, Mike Gemünde
none Details | Review
Add tests for PNG support (10.42 KB, patch)
2010-05-28 09:32 UTC, Mike Gemünde
none Details | Review
Create class ImageBlockFile for image files organized with data blocks (33.10 KB, patch)
2010-05-28 09:36 UTC, Mike Gemünde
committed Details | Review
Introduce support for PNG files (37.33 KB, patch)
2010-05-28 09:36 UTC, Mike Gemünde
committed Details | Review
Add tests for PNG support (10.42 KB, patch)
2010-05-28 09:36 UTC, Mike Gemünde
committed Details | Review

Description Mike Gemünde 2010-05-28 09:32:00 UTC
First implementation of PNG support.
Comment 1 Mike Gemünde 2010-05-28 09:32:02 UTC
Created attachment 162190 [details] [review]
JpegComment need not to be terminated by 0

Some programs set an jpeg comment which is not terminated by a 0. Therfore,
we cannot remove the last character in every case. Rather, check for
a terminated string.

https://bugzilla.gnome.org/show_bug.cgi?id=619920
Comment 2 Mike Gemünde 2010-05-28 09:32:06 UTC
Created attachment 162191 [details] [review]
Add some properties which are usefull for image tags

The property Creator is added to ImageTag. The properties
Copyright, Comment and Title are implemented in CombinedImageTag
to reuse them from Audio/Video.

https://bugzilla.gnome.org/show_bug.cgi?id=619920
Comment 3 Mike Gemünde 2010-05-28 09:32:09 UTC
Created attachment 162192 [details] [review]
Add more flexible PropertyModificationValidator

The new class PropertyModificationValidator allows to test modifications for
every property defined in ImageTag. This makes it more flexible to test them
all.

https://bugzilla.gnome.org/show_bug.cgi?id=619920
Comment 4 Mike Gemünde 2010-05-28 09:32:13 UTC
Created attachment 162193 [details] [review]
Add Test to ensure that the ImageTag properties work correctly

https://bugzilla.gnome.org/show_bug.cgi?id=619920
Comment 5 Mike Gemünde 2010-05-28 09:32:17 UTC
Created attachment 162194 [details] [review]
Add Function which ensures that all possible image tags for an image file are in place

https://bugzilla.gnome.org/show_bug.cgi?id=619920
Comment 6 Mike Gemünde 2010-05-28 09:32:21 UTC
Created attachment 162195 [details] [review]
Remove CommentTest for jpeg test without metadata

It does not make sense to have that test here, because a comment
cannot be added, when no tag is present. And it is against the current
taglib policy to add tags without a request from the user.

https://bugzilla.gnome.org/show_bug.cgi?id=619920
Comment 7 Mike Gemünde 2010-05-28 09:32:25 UTC
Created attachment 162196 [details] [review]
Create class ImageBlockFile for image files organized with data blocks

Some image file formats are organized as data blocks which can be reordered.
Those block are called 'segments' for Jpeg/Jfif files, or 'blocks' for Gif
files. Some of the blocks are metadata and handled by TagLib#. When metadata
is saved back to file, the following must be typically done:
(1) some of the blocks have to be deleted
(2) other blocks are overwritten with the new metadata

The new class ImageBlockFile allows to mark some blocks in the file as
metadata. When metadata is written back to file, the blocks which can be reused
are overwritten, the others are deleted. The File-classes for Jpeg and
Gif can now share this functionality.
Currently, ImageBlockFile only supports saving one data block (which
may contain multiple metadata blocks) and removing all other marked
blocks in file. That is fine for the currently implemented file formats, but
may be changed in future.
Comment 8 Mike Gemünde 2010-05-28 09:32:29 UTC
Created attachment 162197 [details] [review]
Introduce support for PNG files

This commit introduces support for PNG files. A PNG file is parsed
completely and XMP metdata and PNG keywords are extracted. Additionally,
some image properties such as height and with are determined.
Comment 9 Mike Gemünde 2010-05-28 09:32:33 UTC
Created attachment 162198 [details] [review]
Add tests for PNG support

This commit adds a bunch of tests for the PNG support. The sample files
are created with GIMP and modified with exiftool.
Comment 10 Mike Gemünde 2010-05-28 09:36:09 UTC
Created attachment 162199 [details] [review]
Create class ImageBlockFile for image files organized with data blocks

Some image file formats are organized as data blocks which can be reordered.
Those block are called 'segments' for Jpeg/Jfif files, or 'blocks' for Gif
files. Some of the blocks are metadata and handled by TagLib#. When metadata
is saved back to file, the following must be typically done:
(1) some of the blocks have to be deleted
(2) other blocks are overwritten with the new metadata

The new class ImageBlockFile allows to mark some blocks in the file as
metadata. When metadata is written back to file, the blocks which can be reused
are overwritten, the others are deleted. The File-classes for Jpeg and
Gif can now share this functionality.
Currently, ImageBlockFile only supports saving one data block (which
may contain multiple metadata blocks) and removing all other marked
blocks in file. That is fine for the currently implemented file formats, but
may be changed in future.
Comment 11 Mike Gemünde 2010-05-28 09:36:16 UTC
Created attachment 162200 [details] [review]
Introduce support for PNG files

This commit introduces support for PNG files. A PNG file is parsed
completely and XMP metdata and PNG keywords are extracted. Additionally,
some image properties such as height and with are determined.
Comment 12 Mike Gemünde 2010-05-28 09:36:21 UTC
Created attachment 162201 [details] [review]
Add tests for PNG support

This commit adds a bunch of tests for the PNG support. The sample files
are created with GIMP and modified with exiftool.
Comment 13 Ruben Vermeersch 2010-05-30 20:56:21 UTC
Attachment 162199 [details] pushed as d65474c - Create class ImageBlockFile for image files organized with data blocks
Attachment 162200 [details] pushed as 5d8f4a4 - Introduce support for PNG files
Attachment 162201 [details] pushed as 80b691f - Add tests for PNG support


Took me some time to figure out how it works but I must say, it's pretty clever! Very nice! Merged!
Comment 14 Ruben Vermeersch 2010-06-19 17:51:02 UTC
*** Bug 622099 has been marked as a duplicate of this bug. ***