Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #2653 > unrolled thread
| Started by | luser- -droog <mijoryx@yahoo.com> |
|---|---|
| First post | 2016-06-16 21:00 -0700 |
| Last post | 2016-06-21 21:09 -0700 |
| Articles | 14 — 5 participants |
Back to article view | Back to comp.lang.postscript
Xpost now has jpeg device luser- -droog <mijoryx@yahoo.com> - 2016-06-16 21:00 -0700
Re: Xpost now has jpeg device Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-17 00:30 -0700
Re: Xpost now has jpeg device luser- -droog <mijoryx@yahoo.com> - 2016-06-17 09:51 -0700
Re: Xpost now has jpeg device Eli the Bearded <*@eli.users.panix.com> - 2016-06-17 17:46 +0000
Re: Xpost now has jpeg device Markus Triska <triska@metalevel.at> - 2016-06-18 10:21 +0200
Re: Xpost now has jpeg device Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-18 02:21 -0700
Re: Xpost now has jpeg device Markus Triska <triska@metalevel.at> - 2016-06-20 01:49 +0200
Re: Xpost now has jpeg device Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-19 20:19 -0700
Re: Xpost now has jpeg device Markus Triska <triska@metalevel.at> - 2016-06-20 10:43 +0200
Re: Xpost now has jpeg device Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-20 03:20 -0700
Re: Xpost now has jpeg device Markus Triska <triska@metalevel.at> - 2016-06-20 20:49 +0200
Re: Xpost now has jpeg device Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-21 01:40 -0700
Re: Xpost now has jpeg device ken <ken@spamcop.net> - 2016-06-21 10:15 +0100
Re: Xpost now has jpeg device luser- -droog <mijoryx@yahoo.com> - 2016-06-21 21:09 -0700
| From | luser- -droog <mijoryx@yahoo.com> |
|---|---|
| Date | 2016-06-16 21:00 -0700 |
| Subject | Xpost now has jpeg device |
| Message-ID | <f013540d-76f8-4d62-bbbf-fe2c30560aec@googlegroups.com> |
As a companion to the recently added png device, jpeg now joins the
line-up of available devices in xpost.
In the planning stage are tiff and bmp. Ghostscript offers
also pcx, fax (whatever that might be), and psd. But those
seem less important for the purpose of attracting users.
The PNG and JPEG devices were both written by Vincent Torri,
who is getting pretty good at it.
At the same time, I'm also trying to extend the device design
in the direction of supporting higher-level output like dsc ps,
pdf, or svg. This may require more work later to modify all the
devices if their interface changes.
Any other bitmap formats we should support?
josh@LAPTOP-ILO10OOF ~/xpost
$ xpost -h
INF: src/lib/xpost_log.c:292 xpost_log_init() dump interpreter errors in file xdump7G9yPk
Usage: xpost [options] [file.ps]
Postscript level 2 interpreter
Options:
-o, --output=[FILE] output file
-d, --device=[STRING] device name
-Dname=token, --define name=token add definition to userdict
-g, --geometry=WxH{+-}X{+-}Y geometry specification
-q, --quiet suppress interpreter messages (default)
-v, --verbose do not go quiet into that good night
-t, --trace add additional tracing messages, implies -v
-L, --license show program license
-V, --version show program version
-h, --help show this message
Supported devices:
pgm
ppm
null
xcb or win32 or win32gl depending on configuration
bgr
raster
png
jpeg
Note: when using the long-form --define option, take care that the strings
are properly protected from interpretation by the shell. For unix shells
that define shell variables with the syntax name=whatever, the argument
will need to be quoted so the shell doesn't mess with it:
xpost --define 'foo=bar'
or
xpost --define foo\=bar
[toc] | [next] | [standalone]
| From | Lawrence D’Oliveiro <lawrencedo99@gmail.com> |
|---|---|
| Date | 2016-06-17 00:30 -0700 |
| Message-ID | <21eb60ae-f000-4d34-9315-6994ad8efedd@googlegroups.com> |
| In reply to | #2653 |
On Friday, June 17, 2016 at 4:00:09 PM UTC+12, luser- -droog wrote: > Any other bitmap formats we should support? Do you allow more than 8 bits per pixel component?
[toc] | [prev] | [next] | [standalone]
| From | luser- -droog <mijoryx@yahoo.com> |
|---|---|
| Date | 2016-06-17 09:51 -0700 |
| Message-ID | <f0b9372a-ade7-4cf8-a7ba-2ba4c79a4c17@googlegroups.com> |
| In reply to | #2654 |
On Friday, June 17, 2016 at 2:30:14 AM UTC-5, Lawrence D’Oliveiro wrote: > On Friday, June 17, 2016 at 4:00:09 PM UTC+12, luser- -droog wrote: > > > Any other bitmap formats we should support? > > Do you allow more than 8 bits per pixel component? Yes, but none of the devices currently output anything larger than 8 bits per component. The values are passed to the device functions as postscript number objects, either integer or real. These are implemented in xpost as int32_t and (32bit) float. There is also an untested LARGE_OBJECT configuration which would use int64_t and double. The dictionary code needs some fixes (at least) for large objects to work.
[toc] | [prev] | [next] | [standalone]
| From | Eli the Bearded <*@eli.users.panix.com> |
|---|---|
| Date | 2016-06-17 17:46 +0000 |
| Message-ID | <eli$1606171338@qz.little-neck.ny.us> |
| In reply to | #2653 |
In comp.lang.postscript, luser- -droog <mijoryx@yahoo.com> wrote: > In the planning stage are tiff and bmp. Ghostscript offers > also pcx, fax (whatever that might be), and psd. But those > seem less important for the purpose of attracting users. The "fax" is probably CCITT fax: http://www.digitalpreservation.gov/formats/fdd/fdd000136.shtml If you do a reasonably complete TIFF, you should have the fax code already, it is one of the child formats TIFF can encapsulate. Elijah ------ TIFF trivia 'r' us
[toc] | [prev] | [next] | [standalone]
| From | Markus Triska <triska@metalevel.at> |
|---|---|
| Date | 2016-06-18 10:21 +0200 |
| Message-ID | <m2y462gb5o.fsf@metalevel.at> |
| In reply to | #2653 |
luser- -droog <mijoryx@yahoo.com> writes: > At the same time, I'm also trying to extend the device design > in the direction of supporting higher-level output like dsc ps, > pdf, or svg. This may require more work later to modify all the > devices if their interface changes. > > Any other bitmap formats we should support? Personally, I would really greatly appreciate the SVG device! I have a few PostScript files that I would like to convert to SVG, and which I think can serve as good test cases for a PS -> SVG conversion. Keep up the good work! All the best, Markus
[toc] | [prev] | [next] | [standalone]
| From | Lawrence D’Oliveiro <lawrencedo99@gmail.com> |
|---|---|
| Date | 2016-06-18 02:21 -0700 |
| Message-ID | <e2bd5799-08a4-4a6c-8971-4a5778347b92@googlegroups.com> |
| In reply to | #2657 |
On Saturday, June 18, 2016 at 8:21:26 PM UTC+12, Markus Triska wrote: > > luser- -droog writes: > >> Any other bitmap formats we should support? > > Personally, I would really greatly appreciate the SVG device! SVG is not a bitmap format. Interestingly, Ghostscript doesn’t support it either, though Cairo does.
[toc] | [prev] | [next] | [standalone]
| From | Markus Triska <triska@metalevel.at> |
|---|---|
| Date | 2016-06-20 01:49 +0200 |
| Message-ID | <m2h9cokadf.fsf@metalevel.at> |
| In reply to | #2658 |
Lawrence D’Oliveiro <lawrencedo99@gmail.com> writes: > SVG is not a bitmap format. That's indeed one of the reasons why I would greatly appreciate it! I have many hand-"drawn" graphs in PostScript which I would like to embed in web pages too. I'm looking forward to these developments. Well, wouldn't the web be great if (safe) PostScript figures could be easily embedded in HTML pages, as inline documents? All the best, Markus
[toc] | [prev] | [next] | [standalone]
| From | Lawrence D’Oliveiro <lawrencedo99@gmail.com> |
|---|---|
| Date | 2016-06-19 20:19 -0700 |
| Message-ID | <0c4d6710-a75f-488f-a63e-445705943321@googlegroups.com> |
| In reply to | #2659 |
On Monday, June 20, 2016 at 11:49:19 AM UTC+12, Markus Triska wrote: > Well, wouldn't the web be great if (safe) PostScript figures could be > easily embedded in HTML pages, as inline documents? SVG already does that. PostScript is really an obsolete technology at this stage. Yes, I can see why you would want PostScript-to-SVG conversion...
[toc] | [prev] | [next] | [standalone]
| From | Markus Triska <triska@metalevel.at> |
|---|---|
| Date | 2016-06-20 10:43 +0200 |
| Message-ID | <87porctfmx.fsf@hyperplane.at> |
| In reply to | #2661 |
Lawrence D’Oliveiro <lawrencedo99@gmail.com> writes: > PostScript is really an obsolete technology at this stage. PostScript is still a good improvement over most of its successors in my view. SVG is a only a very poor substitute in many ways. > Yes, I can see why you would want PostScript-to-SVG conversion... I'm glad you understand this. I will indeed never write SVG by hand! All the best, Markus
[toc] | [prev] | [next] | [standalone]
| From | Lawrence D’Oliveiro <lawrencedo99@gmail.com> |
|---|---|
| Date | 2016-06-20 03:20 -0700 |
| Message-ID | <54579124-98ae-4cdb-aad4-e4bceef0d18a@googlegroups.com> |
| In reply to | #2662 |
On Monday, June 20, 2016 at 8:43:05 PM UTC+12, Markus Triska wrote: > > Lawrence D’Oliveiro writes: > >> PostScript is really an obsolete technology at this stage. > > PostScript is still a good improvement over most of its successors in my > view. SVG is a only a very poor substitute in many ways. PostScript is far too complicated--nobody wants a programming language in their graphics API nowadays. That’s why Adobe invented PDF. >> Yes, I can see why you would want PostScript-to-SVG conversion... > > I'm glad you understand this. I will indeed never write SVG by hand! I have written it by hand.
[toc] | [prev] | [next] | [standalone]
| From | Markus Triska <triska@metalevel.at> |
|---|---|
| Date | 2016-06-20 20:49 +0200 |
| Message-ID | <m2d1nbk861.fsf@mt-imac.local> |
| In reply to | #2663 |
Lawrence D’Oliveiro <lawrencedo99@gmail.com> writes: >> I'm glad you understand this. I will indeed never write SVG by hand! > > I have written it by hand. Your SVGs are most likely a lot simpler than the ones I need. My PostScript files often contain logic that is extremely tedious to translate to SVG, and extremely easy to express in PostScript. Also, I cannot recommend writing PDF by hand. Overall, from the alternatives you have now mentioned, I still prefer the unwanted, really obsolete one. All the best, Markus
[toc] | [prev] | [next] | [standalone]
| From | Lawrence D’Oliveiro <lawrencedo99@gmail.com> |
|---|---|
| Date | 2016-06-21 01:40 -0700 |
| Message-ID | <f73ef8f6-4dc1-445b-8f61-7b8ea24518d3@googlegroups.com> |
| In reply to | #2664 |
On Tuesday, June 21, 2016 at 6:49:11 AM UTC+12, Markus Triska wrote: > My PostScript files often contain logic that is extremely tedious to > translate to SVG, and extremely easy to express in PostScript. Also, I > cannot recommend writing PDF by hand. Overall, from the alternatives you > have now mentioned, I still prefer the unwanted, really obsolete one. I thought “sombody must have written a PostScript-to-SVG translator”. And sure enough, there is pstoedit <http://www.pstoedit.net/>. I just tried the Debian package version with one or two simple PostScript files. Seemed to work OK.
[toc] | [prev] | [next] | [standalone]
| From | ken <ken@spamcop.net> |
|---|---|
| Date | 2016-06-21 10:15 +0100 |
| Message-ID | <MPG.31d315f8d8bf6ce6989907@usenet.plus.net> |
| In reply to | #2666 |
In article <f73ef8f6-4dc1-445b-8f61-7b8ea24518d3@googlegroups.com>, lawrencedo99@gmail.com says... > > On Tuesday, June 21, 2016 at 6:49:11 AM UTC+12, Markus Triska wrote: > > My PostScript files often contain logic that is extremely tedious to > > translate to SVG, and extremely easy to express in PostScript. Also, I > > cannot recommend writing PDF by hand. Overall, from the alternatives you > > have now mentioned, I still prefer the unwanted, really obsolete one. > > I thought ?sombody must have written a PostScript-to-SVG translator?. And sure enough, there is pstoedit <http://www.pstoedit.net/>. > > I just tried the Debian package version with one or two simple PostScript files. Seemed to work OK. From a Stack Overflow question: http://stackoverflow.com/questions/37883053/how-can-i-get-pstoedit-to- handle-cid-type0c-fonts-as-text It may not work too well with CIDFonts. Ghostscript still has a deprecated SVG output device, but as I recall the reason it was dropped is because of poor font support, we couldn't emit SVG text that worked very reliably (for more complex cases). If you want to experiment with it then you will need to build Ghostscript yourself, its no longer built automatically (distributions may vary here). I'm also led to believe (I don't know myself) that SVG consumers are even less good about font support than that provided by the documentation. We could, of course, degenerate text to vectors, but I think that was where this thread started..... Ken
[toc] | [prev] | [next] | [standalone]
| From | luser- -droog <mijoryx@yahoo.com> |
|---|---|
| Date | 2016-06-21 21:09 -0700 |
| Message-ID | <6c7591b5-4518-473d-9c03-11bc2f3c1c7b@googlegroups.com> |
| In reply to | #2657 |
On Saturday, June 18, 2016 at 3:21:26 AM UTC-5, Markus Triska wrote: > luser- -droog <mijoryx@yahoo.com> writes: > > > At the same time, I'm also trying to extend the device design > > in the direction of supporting higher-level output like dsc ps, > > pdf, or svg. This may require more work later to modify all the > > devices if their interface changes. > > > > Any other bitmap formats we should support? > > Personally, I would really greatly appreciate the SVG device! I have a > few PostScript files that I would like to convert to SVG, and which I > think can serve as good test cases for a PS -> SVG conversion. > > Keep up the good work! > > All the best, > Markus Depending on how demanding the postscript code is, there is still the old xpost2 source which uses Cairo. xpost2 runs level 1 postscript. If you need a big stack, it will need to be compiled with a big stack, dicts do not grow, etc. There are a small handful of incomplete level 2 helpers like selectfont, but don't give it a matrix. It only runs on POSIX systems (Linux/BSD/etc. or Cygwin) with X11 and Cairo. http://web.archive.org/web/20160404161504/https://code.google.com/p/xpost/downloads/detail?name=xpost2.pdf&can=2&q= http://web.archive.org/web/20160404161504/https://code.google.com/p/xpost/downloads/detail?name=xpost2g.zip&can=2&q= But there is a pdf device. It shouldn't be too difficult to copy and modify to make an svg device (just change the Cairo calls). But I stress again, the constraints it places on the postscript code are severe.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.postscript
csiph-web