Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • GIMP GIMP
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,813
    • Issues 3,813
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 91
    • Merge requests 91
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • GIMPGIMP
  • Merge requests
  • !793

Initial support for CMYK JPEGXL import and export

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Alx Sa requested to merge alxsa-cmyk-jpegxl-import into master Dec 03, 2022
  • Overview 29
  • Commits 2
  • Pipelines 36
  • Changes 1

This patch attempts to add support for importing and exporting CMYK/A JPEGXL images. A reference CMYK image can be found here: https://github.com/libjxl/conformance/tree/master/testcases/cmyk_layers

The format stores the K value in a separate channel (currently ignored by GIMP), which is labeled as JXL_CHANNEL_BLACK. This patch checks for the existence of this channel; if so, it assumes the image is intended to be CMYK. It loads the K data into a buffer, then appends it via GeglBufferIter to the CMY buffer to create a final CMYK/A image. The alpha channel is optionally loaded if it exists. The CMYK profile is also stored as the image's simulation profile.

Before and After:

Current Patch
before cmyk-jpgxl-progress

Update: CMYK/A export is now supported as well. The Key channel (and Alpha if it exists) are extracted from the image and stored in extra channel(s). The simulation color profile is also stored - in fact, this is a requirement of the specification, so CMYK/A export without a profile is disabled. The output was confirmed as CMYK via the jxlinfo utility included in the libjxl library:

image

Edited Dec 10, 2022 by Alx Sa
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: alxsa-cmyk-jpegxl-import