1

I would like to include a TIFF image into my PostScript similarily to an EPS and a JPEG. But it fails on creation stating the file ImageType isn't JPEG.

Is this possible?

MissAran
  • 125
  • 9

1 Answers1

2

You can't use a TIFF directly in PostScript, as PostScript doesn't support the TIFF file format. You can use a PostScript program to read a TIFF file and process it as an image, for example :

Conversion of TIFF to PDF with Ghostscript

Community
  • 1
  • 1
KenS
  • 30,202
  • 3
  • 34
  • 51
  • I've read your comments in the other thread. You talk about a program you've wrote that would do something similar to viewjpg.ps is that correct? Essentially the goal would be to insert the TIFF into the PDF - now if I converted this TIFF into JPG, job done but I would like to have the TIFF in the PDF for intergrity if that is a possiblity - Apologies, I am slowly trying to understand the powers and limitations of PostScript :) – MissAran Jun 08 '15 at 15:32
  • Its a PostScript program which reads a TIFF file and processes it using the PostScript image operator. Yes its like viewjpeg.ps. You cannot put a TIFF in a PDF file, PDF like PostScript does not support TIFF. You can have images which are compressed using schemes other than DCT (JPEG) but you cannot have other image file formats. Note that PostScript and PDF are not the same thing, the no longer even share the same graphics model. – KenS Jun 08 '15 at 19:04
  • Thanks for that - PostScript to me is a steep learning curve. So, OK, I want to import a TIFF into a PDF by using PostScript - does that sound more accurate? Or should I be thinking that I want to import a TIFF by PostScript displaying it in a PDF using Ghostscript? I know TIFFs can be inserted into PDFs by other libraries but is this not possible by PostScript and Ghostscript? – MissAran Jun 09 '15 at 16:11
  • Don't think about TIFF, think of image data. You want to take the image data from a TIFF file and make it into a PDF file, or use the image data in your PostScript program. You can't 'insert a TIFF into a PDF file', you can insert the image data from a TIFF file into a PDF file. Once the image data is in the PDF file it isn't a TIFF any more. Note that PostScript doesn't support TIFF files directly, so you have to write a PostScript program (PS is a programming language) to read the image data from the TIFF file. That's what the answer above pointed to. – KenS Jun 10 '15 at 06:54
  • Thanks alot for explaining that. Would it be possible to ask if you could send me that program you created from the other thread so I can tinker what that to get me started? – MissAran Jun 10 '15 at 10:38
  • There is a link to it in that thread, here it is again https://groups.google.com/forum/#!msg/comp.lang.postscript/xLMTVNzGNXQ/g7gItvNwPEIJ – KenS Jun 10 '15 at 11:56