Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft] Fix raw copy when putting CMYK tiff to CMYK output #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 32 additions & 31 deletions cupsfilters/image-tiff.c
Original file line number Diff line number Diff line change
Expand Up @@ -1662,37 +1662,38 @@ _cfImageReadTIFF(
}
}
}

if ((saturation != 100 || hue != 0) && bpp > 1)
cfImageRGBAdjust(in, img->ysize, saturation, hue);

switch (img->colorspace)
{
default :
break;

case CF_IMAGE_WHITE :
cfImageRGBToWhite(in, out, img->ysize);
break;
case CF_IMAGE_RGB :
cfImageRGBToRGB(in, out, img->ysize);
break;
case CF_IMAGE_BLACK :
cfImageRGBToBlack(in, out, img->ysize);
break;
case CF_IMAGE_CMY :
cfImageRGBToCMY(in, out, img->ysize);
break;
case CF_IMAGE_CMYK :
cfImageRGBToCMYK(in, out, img->ysize);
break;
}

if (lut)
cfImageLut(out, img->ysize * bpp, lut);

_cfImagePutCol(img, x, 0, img->ysize, out);
}
if (img->colorspace != CUPS_IMAGE_CMYK)
{
if ((saturation != 100 || hue != 0) && bpp > 1)
cupsImageRGBAdjust(in, img->ysize, saturation, hue);

switch (img->colorspace)
{
default:
break;

case CUPS_IMAGE_WHITE:
cupsImageRGBToWhite(in, out, img->ysize);
break;
case CUPS_IMAGE_RGB:
cupsImageRGBToRGB(in, out, img->ysize);
break;
case CUPS_IMAGE_BLACK:
cupsImageRGBToBlack(in, out, img->ysize);
break;
case CUPS_IMAGE_CMY:
cupsImageRGBToCMY(in, out, img->ysize);
break;
case CUPS_IMAGE_CMYK:
cupsImageRGBToCMYK(in, out, img->ysize);
break;
}

if (lut)
cupsImageLut(out, img->ysize * bpp, lut);

_cupsImagePutCol(img, x, 0, img->ysize, out);
}
}

break;
Expand Down