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 779622 - Incorrect data when embedding pictures (Vorbis)
Incorrect data when embedding pictures (Vorbis)
Status: RESOLVED NOTABUG
Product: easytag
Classification: Other
Component: general
master
Other Linux
: Normal minor
: 2.4
Assigned To: EasyTAG maintainer(s)
EasyTAG maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-03-05 17:23 UTC by alessandro.grassi
Modified: 2017-03-05 23:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description alessandro.grassi 2017-03-05 17:23:43 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?
Comment 1 David King 2017-03-05 18:35:24 UTC
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.
Comment 2 alessandro.grassi 2017-03-05 19:36:54 UTC
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).
Comment 3 David King 2017-03-05 23:42:35 UTC
(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.