cups-filters icon indicating copy to clipboard operation
cups-filters copied to clipboard

imagetoraster: Completely black page when CMYK TIFF is input

Open LXY1226 opened this issue 1 year ago • 1 comments

Describe the bug ArgyllCMS's cctiff generated CMYK tiff produces completely black pages in imagetoraster. And the tiff is displayed correctly in gimp and windows.

To Reproduce Steps to reproduce the behavior:

  1. Get a cmyk tiff a. get ffmpeg and ArgyllCMS b. use ffmpeg to convert an image to tiff ffmpeg -i test.png test.tif c. use cctiff in argyllcms to apply rgb -> xyz -> cmyk operation cctiff test.tif argb.icc cmyk.icc test_cmy.tif tip: all will be provided at bottom of this article include a cmyk icc for example. tip: the linux binary provided by ArgyllCMS will produces broken tiff on my machine. so try it under windows or just download my sample.
  2. try to print it though cups by command line lp test_cmy.tif tips. You can try my script to use imagetoraster only and use rasterview to validate this in order to preserve inks :<
imagetoraster output from my debugging script DEBUG: Page = 371x539; 0,0 to 371,539 DEBUG: Color Manager: Calibration Mode/Off DEBUG: Calling FindDeviceById(cups-Epson_Stylus_Photo_R330) DEBUG: Found device /org/freedesktop/ColorManager/devices/cups_Epson_Stylus_Photo_R330 DEBUG: Calling org.freedesktop.ColorManager.Device.Get(ProfilingInhibitors) DEBUG: Searching for profile "720dpi/TestForASheet_100"... INFO: Loading print file. DEBUG: TIFF resolution = 72.000000x72.000000, units=2 DEBUG: Stored resolution = 72x72 PPI DEBUG: img->colorspace = -4 DEBUG: orientation = top-left DEBUG: photometric = 5 DEBUG: compression = 5 DEBUG: Before scaling: xppi=0, yppi=0, zoom=1.00 DEBUG: Before scaling: xprint=5.2, yprint=7.5 DEBUG: img->xppi = 72, img->yppi = 72, aspect = 1.000000 DEBUG: Portrait size is 5.16 x 7.30 inches DEBUG: Landscape size is 3.65 x 5.16 inches DEBUG: Auto orientation... DEBUG: Using portrait orientation... DEBUG: xpages = 1x5.16in, ypages = 1x7.30in DEBUG: Updated custom page size to 5.16 x 7.30 inches... DEBUG: PageSize = [371 525] DEBUG: PageLeft = 0.000000, PageRight = 371.338562, PageBottom = 0.000000, PageTop = 525.275269 DEBUG: Orientation: 0, XPosition: 0, YPosition: 0, ImagingBoundingBox = [0 0 371 525] DEBUG: cupsWidth = 3713 DEBUG: cupsHeight = 5252 DEBUG: cupsBitsPerColor = 8 DEBUG: cupsBitsPerPixel = 32 DEBUG: cupsBytesPerLine = 14852 DEBUG: cupsColorOrder = 0 DEBUG: cupsColorSpace = 6 DEBUG: img->colorspace = -4 INFO: Formatting page 1.
3. It gets totally black page.

Expected behavior Correctly printed

Screenshots 870f4a5335141098c2995a275bd89edb

System Information:

  • OS: Debian bookworm (and unstable for latest version cups)
  • cups (2.4.10-2) and (2.4.2-3+deb12u8)

Additional context

samples.zip

Edit: ArgyllCMS generated CMYK(YCCK) jpeg rendered correctly in imagetoraster

imagetoraster output from my debugging script DEBUG: Page = 371x539; 0,0 to 371,539 DEBUG: Color Manager: Calibration Mode/Off DEBUG: Calling FindDeviceById(cups-Epson_Stylus_Photo_R330) DEBUG: Found device /org/freedesktop/ColorManager/devices/cups_Epson_Stylus_Photo_R330 DEBUG: Calling org.freedesktop.ColorManager.Device.Get(ProfilingInhibitors) DEBUG: Searching for profile "720dpi/TestForASheet_100"... INFO: Loading print file. DEBUG: Adobe CMYK JPEG detected (inverting color values) DEBUG: num_components = 4 DEBUG: jpeg_color_space = JCS_YCCK DEBUG: Converting image to CMYK... DEBUG: JPEG image 1100x1556x4, 200x200 PPI DEBUG: Before scaling: xppi=0, yppi=0, zoom=1.00 DEBUG: Before scaling: xprint=5.2, yprint=7.5 DEBUG: img->xppi = 200, img->yppi = 200, aspect = 1.000000 DEBUG: Portrait size is 5.16 x 7.30 inches DEBUG: Landscape size is 3.65 x 5.16 inches DEBUG: Auto orientation... DEBUG: Using portrait orientation... DEBUG: xpages = 1x5.16in, ypages = 1x7.30in DEBUG: Updated custom page size to 5.16 x 7.30 inches... DEBUG: PageSize = [371 525] DEBUG: PageLeft = 0.000000, PageRight = 371.338562, PageBottom = 0.000000, PageTop = 525.275269 DEBUG: Orientation: 0, XPosition: 0, YPosition: 0, ImagingBoundingBox = [0 0 371 525] DEBUG: cupsWidth = 3713 DEBUG: cupsHeight = 5252 DEBUG: cupsBitsPerColor = 8 DEBUG: cupsBitsPerPixel = 32 DEBUG: cupsBytesPerLine = 14852 DEBUG: cupsColorOrder = 0 DEBUG: cupsColorSpace = 6 DEBUG: img->colorspace = -4 INFO: Formatting page 1.

LXY1226 avatar Nov 11 '24 08:11 LXY1226

ok i got it

LXY1226 avatar Nov 11 '24 16:11 LXY1226