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):

We output a JPEG that looks like this:

Or a PNG that looks like this:

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.
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):
We output a JPEG that looks like this:
Or a PNG that looks like this:
Minimal code for trying this out:
Change
output_formatto"jpeg"to see the alternative version.