GNOME Bugzilla – Bug 779622
Incorrect data when embedding pictures (Vorbis)
Last modified: 2017-03-05 23:42:35 UTC
When creating a METADATA_BLOCK_PICTURE structure to embed an image in an OGG Vorbis file, the "color depth" and "indexed colors" fields are always set to zero. See https://github.com/GNOME/easytag/blob/master/src/tags/ogg_tag.c#L1096: /* Adding width, height, color depth, indexed colors. */ convert_to_byte_array (pic->width, array); add_to_guchar_str (ustring, &ustring_len, array, 4); convert_to_byte_array (pic->height, array); add_to_guchar_str (ustring, &ustring_len, array, 4); convert_to_byte_array (0, array); add_to_guchar_str (ustring, &ustring_len, array, 4); convert_to_byte_array (0, array); add_to_guchar_str (ustring, &ustring_len, array, 4); While it appears not to cause problems in practice, it would be better to populate them correctly. Would it be difficult to do so?
The FLAC specification for METADATA_BLOCK_PICTURE mentions that non-indexed -colour images should have the indexed colours field set to zero. For the colour depth, it is necessary to query the image format to see if an alpha channel is present, which is not currently done. I added a TODO for this, but it is not a high priority because the field is for information purposes only.
PNG images can be indexed, so indexed colours field would need to be non-zero in that case. I agree that it is a low-priority thing. I will try to do it for fun and send a pull request (probably not soon, but it's in my TODO list).
(In reply to alessandro.g89 from comment #2) > PNG images can be indexed, so indexed colours field would need to be > non-zero in that case. EasyTAG currently only writes PNGs with 8 bits per sample.