Skip to content

Fix CMYK/RGB conversion for JPEGs and PNGs #7

@philgyford

Description

@philgyford

The colours in output files are darker in JPEGs compared to PNGs. The JPEGs are saved with CMYK mode, while PNGs must be RGB.

The difference in output colours is something to do with conversion between CMYK and RGB, and colour profiles, but I don't understand how to fix this.

e.g. converting this image (which is actually an RGB JPEG):

cmyk

We output a JPEG that looks like this:

cmyk_halftoned

Or a PNG that looks like this:

cmyk_halftoned

Minimal code for trying this out:

import halftone

h = halftone.Halftone("/path/to/file.jpg")
h.make(output_format="png")

Change output_format to "jpeg" to see the alternative version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions