photoprism/pkg/colors/profiles.go
Michael Mayer 5be456a09f JPEG: Convert Apple "Display P3" colors to standard sRGB #1474
Other color profiles and file formats are not supported yet. Should
be easy to add though. Main difficulty will be profile name comparison:
For example "Adobe RGB (1998)" vs just "Adobe RGB".
2021-12-09 07:00:39 +01:00

17 lines
310 B
Go

package colors
import "strings"
type Profile string
// Supported color profiles.
const (
Default Profile = ""
ProfileDisplayP3 Profile = "Display P3"
)
// Equal compares the color profile name case-insensitively.
func (p Profile) Equal(s string) bool {
return strings.EqualFold(string(p), s)
}