Thread View: adobe.postscript.programming
6 messages
6 total messages
Started by jdaw1
Wed, 16 Sep 2009 10:15
Painting an Image: beginner's questions
Author: jdaw1
Date: Wed, 16 Sep 2009 10:15
Date: Wed, 16 Sep 2009 10:15
14 lines
1818 bytes
1818 bytes
In a bit more than a decade of occasional PostScript programming, I have never needed to paint a bitmap image. For the first time, I do. Are there standard routines for images in common formats (e.g., any of PNG, GIF, JPG)? Rephrased, is there a standard snippet of PostScript that my code can use to render a local file (e.g., example.png or example.gif or example.jpg) onto the current page? The image itself will probably start as JPG, but can be GraphicConverter'd into any standard format. Further I understand that the code might need to know a few things, such as the image size, but I'm happy to add that 'manually'. Thank you.
Re: Painting an Image: beginner's questions
Author: Jeffrey H. Coffield
Date: Thu, 17 Sep 2009 12:51
Date: Thu, 17 Sep 2009 12:51
26 lines
2131 bytes
2131 bytes
jdaw1 wrote: > In a bit more than a decade of occasional PostScript programming, I > have never needed to paint a bitmap image. For the first time, I do. > > Are there standard routines for images in common formats (e.g., any of > PNG, GIF, JPG)? Rephrased, is there a standard snippet of PostScript > that my code can use to render a local file (e.g., example.png or > example.gif or example.jpg) onto the current page? > > The image itself will probably start as JPG, but can be > GraphicConverter'd into any standard format. Further I understand that > the code might need to know a few things, such as the image size, but > I'm happy to add that 'manually'. > > Thank you. A simple Google search returned this http://www.usq.edu.au/users/leis/notes/latex/postscript.html Look for jpeg2ps. I have not used it so I can't say if it's good or not. Jeff Coffield http://www.digitalsynergyinc.com
Re: Painting an Image: beginner's questions
Author: jdaw1
Date: Thu, 17 Sep 2009 21:39
Date: Thu, 17 Sep 2009 21:39
7 lines
1598 bytes
1598 bytes
> Look for jpeg2ps. I have not used it so I can't say if it's good or not. Thank you, but I was hoping—perhaps in vain—for PS code to do it, rather than a "command-line utility". Maybe, less elegantly, I should just GraphicConverter to EPS and run that.
Re: Painting an Image: beginner's questions
Author: Jeffrey H. Coffield
Date: Fri, 18 Sep 2009 14:28
Date: Fri, 18 Sep 2009 14:28
20 lines
2226 bytes
2226 bytes
jdaw1 wrote: >> Look for jpeg2ps. I have not used it so I can't say if it's good or not. > > Thank you, but I was hoping�perhaps in vain�for PS code to do it, > rather than a "command-line utility". > > Maybe, less elegantly, I should just GraphicConverter to EPS and run > that. I have seen some code that I can't locate now that allowed putting a jpeg directly inside a PostScript file but at the time I tried it, it caused several other problems in both the queuing of the file to a printer and in the rip time on the printer itself. I now process all jpeg images into eps files to start with (my web server upload code does it) and then either include the eps into the file or use the PostScript "run" command. Jeff
Re: Painting an Image: beginner's questions
Author: jdaw1
Date: Mon, 21 Sep 2009 15:10
Date: Mon, 21 Sep 2009 15:10
3 lines
1598 bytes
1598 bytes
Of course, the best converter would for GIF, as its transparency could be used. (Or PNG, but its transparency would have to be subject to a cutoff dividing fully opaque from fully transparent.)
Re: Painting an Image: beginner's questions
Author: Helge Blischke
Date: Sun, 10 Jan 2010 14:29
Date: Sun, 10 Jan 2010 14:29
23 lines
1853 bytes
1853 bytes
jdaw1 wrote: > In a bit more than a decade of occasional PostScript programming, I > have never needed to paint a bitmap image. For the first time, I do. > > Are there standard routines for images in common formats (e.g., any of > PNG, GIF, JPG)? Rephrased, is there a standard snippet of PostScript > that my code can use to render a local file (e.g., example.png or > example.gif or example.jpg) onto the current page? > > The image itself will probably start as JPG, but can be > GraphicConverter'd into any standard format. Further I understand that > the code might need to know a few things, such as the image size, but > I'm happy to add that 'manually'. > > Thank you. I came across this thread only today. If you still need a solution to your problem, I have a set of PostScript procedures for directly processing a several image formats (TIFF, GIF, JPEG, EPS). Drop me an e-mail if you are interested (h dot blischke at acm dot org). Helge
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads