Further support on www.tinaja.com
(The following is believed correct. Please report any errors or differing experiences.)
Many popular programs give you one or more
methods to convert a JPEG image
into a PostScript .eps file. These include Illustrator, PhotoShop,
Debabelizer, Transverter
Pro, Image Alchemy, and others.
The Adobe Acrobat Distiller gives us a new, simple, and extremely
flexible method of
converting JPEG to PDF. A short PostScript routine is used to read and
filter a host
disk based JPEG file. This file is converted to an image and sent to distiller.
Here's a summary of the method, which leans heavily on Adobe Tech
Note #5116
and Red Book section 4.10.3.
Assume you have a host resident JPEG file called barro.jpg. Assume
further that this
file is 37 pixels wide and 34 pixels high and is in a directory of C:\Windows\Desktop\barro.
Create the following PostScript code using Word Pad or another editor.
Or else include
this code in another PostScript proc...
% read a JPEG image tutorial example
/DeviceRGB setcolorspace % pick color model
200 100 translate %
set page position
37 34 scale %
magnify unit square
/infilename (C:\\windows\\desktop\\barro\\barro.jpg)def % filename
% note DOUBLE SLASHES in PS String!
/infile infilename (r) file def % establish input read file
/Data {infile /DCTDecode filter} def % define a data source
<< %
start image dicationary
/ImageType 1 %
always one
/Width 37 %
JPEG width in pixels
/Height 34 %
JPEG height in pixels
/ImageMatrix [37 0 0 -34 0 34 ] %
see comments below
/DataSource Data %
proc to get filtered JPEG
/BitsPerComponent
8 %
color resolution
/Decode [0 1 0 1 0 1] %
per red book 4.10
>>
image % call the image operator
showpage % show results
The ImageMatrix is both confusing and tricky. ImageMatrix is
what you need to get from
a unit square back to the JPEG pixel size.
A typical PostScript matrix is [ wide climb lean high xshift yshift ]
The fourth element height is negative because JPEG images vertically
in the opposite direction
of a PS image. The sixth element vertical offset repositions to
the top rather than the bottom
of the image.
PostScript uses ImageMatrix backwards to get you from your JPEG
size to a unit square.
Your usual translates, scales, and whatever then remap the unit
square to your end size.
To complete the conversion, save your routine as an ACII text file.
Then send the
PostScript routine to the Acrobat Distiller.
A PDF file should result with JPEG files properly imaged.
All sorts of options are possible. Such as saving JPEG images to string
files, conversion to
patterns, or outputting ASCII85 over JPEG for non-transparent or 7-bit
comm.