GNOME Bugzilla – Bug 619921
TagLib# does not support PNG
Last modified: 2010-06-19 17:51:02 UTC
First implementation of PNG support.
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
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
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
Created attachment 162193 [details] [review] Add Test to ensure that the ImageTag properties work correctly https://bugzilla.gnome.org/show_bug.cgi?id=619920
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
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
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.
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.
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.
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.
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.
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.
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!
*** Bug 622099 has been marked as a duplicate of this bug. ***