Skip to content

Bug: UserComment displays as hex/binary instead of decoded text #19

@rpuneet

Description

@rpuneet

Problem

The UserComment EXIF tag contains an 8-byte character code prefix followed by text, but imx displays it as hex or "binary data" instead of decoding the text.

Examples

JPEG file:

imx:  "UserComment": "415343494900000053686f7420647572696e6720676f6c64656e20686f7572..."
exiftool: "UserComment": "Shot during golden hour, 3-stop graduated ND filter used"

CR2 file:

imx: "UserComment": {"size": 264, "type": "binary"}
exiftool: (decodes the text content)

Root Cause

UserComment format: 8-byte charset ID + variable-length text

  • ASCII\0\0\0 (41534349490000) = ASCII encoding
  • UNICODE\0 = UTF-16 encoding
  • JIS\0\0\0\0\0 = JIS encoding

Acceptance Criteria

  • Detect charset prefix (ASCII, UNICODE, JIS, or undefined)
  • Decode text portion appropriately
  • Handle edge cases (empty, malformed)
  • Unit tests for each encoding type

Priority

Medium - Affects usability for photographers who add comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions