Skip to main content
Participant
May 21, 2015
Question

How to maintain CMYK jpeg when brought back into Illustrator

  • May 21, 2015
  • 0 replies
  • 955 views

Hi there.

I have a Postscript script using Decode to bring in an image

<< /PageSize [419.528 595.276] >> setpagedevice 
  % [ W x H ]
  /DeviceCMYK setcolorspace
  % Page 1

  %
  % Set the Original to be the top left
  %
  0 595.276 translate
  1 -1 scale
  gsave


  %% Images when flipped to draw correctly are scaled UPWARDS
%% so you need to move the x,y position to the bottom left

-1.44 621.714330709 translate % Bottom Left Cordinates

% unset the mirror or the image will be flipped!
1 -1 scale

% scale the image
438.000944882 657.119055118 scale %%% Need to work out size and width into Units


/Image1File (cmyk_image.jpg) (r) file /DCTDecode filter def

/Image1
{
<<
  /ImageType 1
  /Width 1825
  /Height 2738
  /ImageMatrix [1825 0 0 -2738 0 2738]
  /BitsPerComponent 8
  /Decode [1 0 1 0 1 0 1 0] % can either be 1 0 or 0 1
  /DataSource Image1File
>>
} bind def

/DeviceCMYK setcolorspace
Image1 image

% Reset to previous X and Y ( line 13 )
grestore
gsave

showpage

I understand that to bring in Photoshop images is to invert the Decode.... However, once I have produced my pdf when I bring it back into Illustrator the jpeg turns negative.  How can I stop this from happening?

I execute PS using Ghostscript

gs -o output.pdf -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -dPDFSETTINGS=/prepress input.ps

Attached are the JPEG and PDF.

https://www.wetransfer.com/downloads/c3e57ca99cd4a5541cf116f28a9bac7720150521144511/55f8e50755d85480f2ceb51238cd78cc20150521144511/c13c53

This topic has been closed for replies.