Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview cannot be read from an EPS file #3072

Open
ribtoks opened this issue Nov 20, 2024 · 0 comments
Open

Preview cannot be read from an EPS file #3072

ribtoks opened this issue Nov 20, 2024 · 0 comments
Labels

Comments

@ribtoks
Copy link

ribtoks commented Nov 20, 2024

Describe the bug

Trying to read the embedded preview from an EPS file (attached) using exiv2 0.28.3. Exiv2 fails when reading metadata, although Windows and Linux (with Gnome) can show the preview of the file in default file managers.

The file itself was created with Adobe Illustrator, there's actually nothing special about it, except that exiv2 chokes on it.

The error is "Cannot read image data" and it produces a warning on the background with text "Warning: Page at position 190753 conflicts with implicit page at position: 9831"

To Reproduce

    Exiv2::Image::UniquePtr image = Exiv2::ImageFactory::open(filepath);
    image->readMetadata(); // <- it fails here

    Exiv2::PreviewManager pm(*image);
    Exiv2::PreviewPropertiesList list = pm.getPreviewProperties();
    // .... rest of the code from standard example

Expected behavior

EPS can be parsed, together with the preview.

Desktop (please complete the following information):

  • OS and version: Linux (Ubuntu 22.04), Windows 10 and 11
  • Exiv2 version and source: 0.28.3 from GitHub
  • Compiler and version: g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
  • Compilation mode and/or compiler flags: Debug or Release, nothing special.

Additional context

There are 2 files in the archive (GitHub does not allow attaching EPS directly). I have about 6 such files, if needed.

Test_files.zip

@ribtoks ribtoks added the bug label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant