GithubHelp home page GithubHelp logo

iccreader's People

Contributors

gmcusaro avatar hughbe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

iccreader's Issues

minorVersion and refactoring tag

Hello Hugh, (I know, I’m a troublemaker😅)

Working on last version I’ve noticed some things:

  • minorVersion
    I tried several times with many profiles download from color.org, but the number doesn’t appear correct.
    This is my simple test function:
func getVersionColorProfile(of profile: ICCColorProfile) -> String {
      let majorVersion = profile.header.version.majorVersion
      let minorVersion = profile.header.version.minorVersion
      let reserved1 = profile.header.version.reserved1
      return "\(majorVersion).\(minorVersion).\(reserved1)"
 }

For example sRGB_v4_ICC_preference_displayclass.icc (v. 4.2.0) appears 4.32.0, AdobeRGB1998.icc (v. 2.1.0) appears 2.16.0.

  • Tag acsp
    This tag (pag. 16 of icc32.pdf) for profile file signature (byte offset 36-39) has not ecoding. I can think that it is only necessary to check its presence as rawValue in that byte offset as acsp. Using profile.getTag(signature: "acsp”) it returns always nil. Am I doing something wrong?

  • Tag desc
    The previous refactor facilitated access to header tags like profile.getTag(signature: ICCTagSignature.copyright)!.data. Getting the profile name only desc tag is no longer possible.
    Using profile.getTag(signature: ICCTagSignature.profileDescription.value) the console log is:

ICCTag(signature: ICCReader.ICCSignature(value: "desc"), type: ICCReader.ICCSignature(value: "desc"), data: ICCReader.ICCTagData.textDescription(ICCReader.textDescriptionType(sig: ICCReader.ICCSignature(value: "desc"), reserved: 0, count: 17, desc: "Adobe RGB (1998)", ucLangCode: 0, ucCount: 0, ucDesc: "", scCode: 0, scCount: 0, scDesc: “”)))

Are changes needed or am I probably doing something wrong to get for example only Adobe RGB (1998)?

Retrieve gamma value

According to ICC.2-2019 the gamma value should appear in 10.2.2 curveType to retrieve values such as:

"ROMMRGB"  : 1.8
"DisplayP3": 2.4
"Adobe98"  : 2.2

Printing tag rTRC - gTRC - bTRC profile `DisplayP3" (gamma 2.4):

print(profile.getTag(signature: "rTRC"))

// Optional(ICCReader.ICCTag(signature: ICCReader.ICCSignature(value: "rTRC"), type: ICCReader.ICCSignature(value: "para"), data: ICCReader.ICCTagData.parametricCurve(ICCReader.parametricCurveType(sig: ICCReader.ICCSignature(value: "para"), reserved1: 0, functionType: 3, reserved2: 0, values: [ICCReader.s15Fixed16Number(iPart: 2, fPart: 26214), ICCReader.s15Fixed16Number(iPart: 0, fPart: 62119), ICCReader.s15Fixed16Number(iPart: 0, fPart: 3417), ICCReader.s15Fixed16Number(iPart: 0, fPart: 5072), ICCReader.s15Fixed16Number(iPart: 0, fPart: 2651)]))))

Following your code how can I get this gamma value?

Finally seems sRGB cannot be expressed as a single numeric value. Is there a way to return 1024 points. Is it possible to use the same method to get the standard-2.2?

Thanks

p3

Retrieving data

How is it possible with this code in READ.me to recover name, version, profile type, copyright, etc ...?

for tag in file.tags {
  print(tag) 
}

Something like that is possible?

icm

License?

There's no apparent licensing information for this package or its contents…?

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.