GithubHelp home page GithubHelp logo

Comments (5)

Schmidor avatar Schmidor commented on June 20, 2024 2

Thank you. I think that solves our problem with the PDF.
There are many "interesting" variations in PDF writers 😄

from twelvemonkeys.

haraldk avatar haraldk commented on June 20, 2024

Curious...

Thanks for the sample and report! I'll investigate why we get different colors than libJPEG...

from twelvemonkeys.

haraldk avatar haraldk commented on June 20, 2024

Okay... This sample file has an APP14/Adobe marker specifying YCCK, however the "Adobe" string is followed by a 0x01 "Start of Header" character instead of the normal NULL-termination 0x00... So we don't really see it as an Adobe marker but an "Adobe\0x01" custom marker that we ignore...

We could probably change the identifier parsing to stop at the first ASCII control character (<= 0x20) instead of the NULL only. But I'm not sure the sample file is strictly correct...

from twelvemonkeys.

haraldk avatar haraldk commented on June 20, 2024

...or maybe I'm just wrong in assuming that every JPEG marker identifier string should be 0-terminated...

Supporting the DCT Filters in PostScript Level 2 in section 18 Adobe Application-Specific JPEG Marker actually specifies only the characters 'A', 'd', 'o', 'b' and 'e' followed by a two byte version... While I have always thought the version was only a single byte.. 😮

If this is indeed correct, then I guess I need to rewrite a lot of the JPEG marker parsing. 😛

from twelvemonkeys.

haraldk avatar haraldk commented on June 20, 2024

Hmm.. Thinking about it some more, I think (the authors of) the encoder that wrote the file actually just misread the spec. My guess is that they tried to write an App14/Adobe marker with version 1.00, but encoded it as 0x0100 (256) instead of the correct 0x0064 (100)... I think the most recent version is either 1.01 or 1.02, there really isn't any 2.56 version around...

Anyway, I should still handle this, as the spec says two byte version, and not 0-termination...

from twelvemonkeys.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.