prism

package
v1.8.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2026 License: MIT Imports: 4 Imported by: 0

README

Convert colors using ICC profiles to sRGB with support for v2 and v4 ICC color profiles, black point correction and gamut compression.

This code was originally based on code from two other projects, https://github.com/mandykoh/prism (mainly image file format parsing, MIT license) and http://github.com/go-andiamo/iccarus (mainly ICC file parsing, Apache 2.0 license). However it is extensively modified and bears little resemblance to either project's code anymore.

Documentation

Overview

Package prism provides a set of tools for colour management and conversion. Subpackages provide support for encoding/decoding image pixel data in specific colour spaces, and conversions between those spaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertImageToNRGBA

func ConvertImageToNRGBA(img image.Image, parallelism int) *image.NRGBA

ConvertImageToNRGBA is a convenience function for getting an NRGBA image from any image. If the specified image isn’t already NRGBA, a conversion is performed.

parallelism specifies the maximum degree of parallel processing; a value of 4 indicates that processing may be spread across up to four threads. However, this is not guaranteed as not all conversions are parallelised.

func ConvertImageToRGBA

func ConvertImageToRGBA(img image.Image, parallelism int) *image.RGBA

ConvertImageToRGBA is a convenience function for getting an RGBA image from any image. If the specified image isn’t already RGBA, a conversion is performed.

parallelism specifies the maximum degree of parallel processing; a value of 4 indicates that processing may be spread across up to four threads. However, this is not guaranteed as not all conversions are parallelised.

func ConvertImageToRGBA64

func ConvertImageToRGBA64(img image.Image, parallelism int) *image.RGBA64

ConvertImageToRGBA64 is a convenience function for getting an RGBA64 image from any image. If the specified image isn’t already RGBA64, a conversion is performed.

parallelism specifies the maximum degree of parallel processing; a value of 4 indicates that processing may be spread across up to four threads. However, this is not guaranteed as not all conversions are parallelised.

Types

This section is empty.

Directories

Path Synopsis
Package meta and its subpackages provide support for embedded image metadata.
Package meta and its subpackages provide support for embedded image metadata.
autometa
Package autometa provides support for embedded metadata and automatic detection of image formats.
Package autometa provides support for embedded metadata and automatic detection of image formats.
icc
Package icc provides support for working with ICC colour profile data.
Package icc provides support for working with ICC colour profile data.
jpegmeta
Package jpegmeta provides support for working with embedded JPEG metadata.
Package jpegmeta provides support for working with embedded JPEG metadata.
pngmeta
Package pngmeta provides support for working with embedded PNG metadata.
Package pngmeta provides support for working with embedded PNG metadata.
webpmeta
Package webpmeta provides support for working with embedded WebP metadata.
Package webpmeta provides support for working with embedded WebP metadata.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL