Article View: adobe.postscript.programming
Article #1Re: Adding a jpeg to a postscript file
From: Miklos_Somogyi
Date: Fri, 02 Jan 2009 14:31
Date: Fri, 02 Jan 2009 14:31
30 lines
2092 bytes
2092 bytes
Eric, One way to to use jpg images in PS files is to convert the jpg file to eps by one of many applications, e.g. by Acrobat or GraphicConverter. Then you use PS's image operator, the one that takes a dictionary as an argument. If you use GC to do the conversion, all image data is in front of you, in the eps header, in a few lines. You need to consider a few things: a) When you do the jpg -> eps conversion, you may end-up with a huge file. You need to read the application's manual to find out how to make it smaller, if this is acceptable regarding quality. b) To put the image where you want it on the paper, you have several options for scaling and translation. You may ask the operator not to do any of these by setting the `imagematrix' to 'matrix' and do your translate-scale operations before you call `image', or you may ask `imagematrix' to do everything. Just be careful, 'cause your already existing PS code is likely to have used translate and scale, and these operations are cumulative. c) If the eps file is small, you may copy it in your PS after the `image' operator (as `currentfile'). If it is too big, leave it outside and use the `run' command to read it in at runtime. d) If you need to do such things many times, it pays to look around for a a asciihex to ascii85 converter that makes your eps file 5/8 in size without loss of quality. Be prepared for a bit of (lot of) frustration (NOT your fault) and good luck. Miklos
Technical Details
Message-ID:
<59b76798.0@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newshub.sdsu.edu!webcrossingReferences:
<59b76798.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: 10c61a,6c91da5fbb73e921 X-Google-Attributes: gid10c61a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Miklos_Somogyi@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.postscript.programming Subject: Re: Adding a jpeg to a postscript file Message-ID: <59b76798.0@webcrossing.la2eafNXanI> Date: Fri, 2 Jan 2009 06:31:55 -0800 References: <59b76798.-1@webcrossing.la2eafNXanI> Lines: 44 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit