8000 GitHub - go-andiamo/iccarus: Iccarus is a native Go library for parsing ICC Color Profiles
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

go-andiamo/iccarus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Iccarus

GoDoc Latest Version Go Report Card

Iccarus is a native Go library for parsing ICC Color Profiles


Features

  • Direct parsing of ICC profile files (v2 & v4) with no external dependencies
  • Flexible parsing
    • Full, Header only or Header & Tag Table
    • Lazy decoding of tags
    • Extensible tag decoders
  • Extract (parse) ICC profiles from images (.jpeg,.png, .tif & .webp)
  • Color space conversions (experimental)

Installation

go get github.com/go-andiamo/iccarus

Example

package main

import (
    "fmt"
    "github.com/go-andiamo/iccarus"
    "log"
    "os"
)

func main() {
    f, err := os.Open("path/to/profile.icc")
    if err != nil {
        log.Fatal(err)
    }
    defer f.Close()

    profile, err := iccarus.ParseProfile(f, nil)
    if err != nil {
        log.Fatal(err)
    }
    fmt.Printf("Color space: %s\n", profile.Header.ColorSpace)
    fmt.Printf("    Version: %s\n", profile.Header.Version)
    if cprt, err := profile.TagValue(iccarus.TagHeaderCopyright); err == nil {
        fmt.Printf("  Copyright: %s\n", cprt)
    }
}

About

Iccarus is a native Go library for parsing ICC Color Profiles

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

0