Convert large image bitmap graphics (bitmap, PNG, JPEG, etc.) to non-vector postscript
How do I convert a large image and insert it into a postscript?
I used bitmap to HEX conversion and rendering with colorimage. It works for small icons, but I hit the / limitcheck error in ghostscript when I try to insert small images. There seems to be a memory limit for a bitmap in ghostscript.
I'm looking for a solution that can run without third party / preprocessing others and then ghostscript itself.
a source to share
Free vector graphics program InkScape converts your bitmap into easy-to-understand code embedded in the converted graphics.
We recently had a problem when we were sending the postscript code from our mainframe to the printer. We tried converting it with ImageMagik and got the result to work in GhostScript, but in the mainframe language we were using, there was a mainframe of problems passing the printer with the code. Converting InkScape was much easier, much more basic, and we were able to easily identify and remove the external code. What was a 2 month struggle with graphics from ImageMagik converter was resolved after 3 hours with new InkScape graphics.
I think you will be happy with the InkScape results whether you want to convert an image or have an example of a simple Postscript working graphic. Plus, if you create a converter, InkScape is open source!
a source to share
There is no memory limit in Postscript for images as such; but most Postscript interpreters use a 16-bit field for the size of the composite object, so all strings and arrays (and possibly dicts too) are limited to 65536 elements.
So a common trick (which Adobe himself showed us in the Blue Book) is the procedure to get data (or colorimage) to read from the original file and spuriously feed the data in smaller lines, but you can use 65536 string
(maybe a little lower to be " safe ") to drag and drop more data per call.
The Green Paper is Adobe's best source for thinking about when you're designing a PS program for speed or size (as opposed to just "making it work right"). If you have more processing power and narrower bandwidth, you may need to compress everything and unpack your data collection routine.
a source to share