| <<<Back 1 day (to 2021/04/14) | Fwd 1 day (to 2021/04/16) >>> | 20210415 |
unixbsd | hi chris... | 05:57.00 |
| this is for you, ready to have a free linux :_ https://gitlab.com/openbsd98324/linux-legacy | 05:57.14 |
| if you have a kernel, in hand, please let me add you username. | 05:57.34 |
Lelldorin1 | hello all | 19:19.08 |
| how can i convert a jpg to ps? | 19:19.16 |
artifexi- | <KenSharp> Load it into an image application, print to PostScript or export to PostScript if the application permits it | 19:29.24 |
Lelldorin1 | i want to do that with command line | 19:30.27 |
| want to add this to my gui for gs | 19:30.40 |
artifexi- | <KenSharp> I expect ImageMagick will do it | 19:30.41 |
| <KenSharp> And from teh command line | 19:30.46 |
Lelldorin1 | i have done a complete gui for imagemagick on haiku, but i want to work against on my ghostscript gui on haiku os | 19:34.48 |
artifexi- | <KenSharp> Well You can either : | 19:35.04 |
| <KenSharp> 1) Write a complete JPEG image handler in PostScript | 19:35.14 |
| <KenSharp> 2) Ensure you rinput JPEG is baseline JPEG and use the viewjpeg.ps file supplied with Ghostscript and output to the ps2write device. | 19:35.46 |
| <KenSharp> 3) Ensure your input JPEG is baseline JPEG and write your own PostScript wrapper for it. | 19:36.10 |
Lelldorin1 | any examples out there? | 19:36.58 |
artifexi- | <KenSharp> Examples of what ? | 19:37.07 |
Lelldorin1 | jpeg image handler in ps | 19:40.29 |
artifexi- | <KenSharp> No, because that would be very hard to write. | 19:40.42 |
Lelldorin1 | ah ok | 19:40.49 |
artifexi- | <KenSharp> There's an example TIFF handler I wrote some time ago which would demonstrate some of the principles. Basically you need to open the file, read the data byte by byte to assemble the JPEB header objects (I forget what they are called, JPEG2k calls them boxes) | 19:41.43 |
Lelldorin1 | thanks, i will see that i get running | 19:41.46 |
artifexi- | <KenSharp> Then you need to set up the PostScript graphics state appropriately. | 19:41.57 |
| <KenSharp> You can use the built-in DCT filter to read and apply DCT decoding to get the data stream which you then feed to the PostScript image operator. | 19:42.29 |
| <KenSharp> The reason that baseline JPEG is easier is because the PostScript specification allows for DCT encoded data with a JFIF header to be presented directly to the DCTDecode filter. | 19:43.14 |
| <KenSharp> But that only works for baseline JPEG, if your JPEG file isn't baseline then it won't work and you'll have to read it by writing a PostScript program. | 19:43.48 |
| <KenSharp> Which, as I say, would strike me as hard. | 19:43.57 |
| <KenSharp> Far simpler to load the file into an application which already knows how to read the full JPEG specification, and then have it write a PostScript file for you | 19:44.19 |
Lelldorin1 | https://software.besly.de/images/gsgui.png | 19:44.22 |
artifexi- | <KenSharp> Ghostpdl will read certain image formats, I can't remember if JPEG is amongst them but I would imagine it is | 19:44.58 |
Lelldorin1 | thanks a lot | 19:45.54 |
artifexi- | <KenSharp> OK I'm off for the night, good luck | 19:46.15 |
Lelldorin1 | bye | 19:46.28 |
artifexi- | <Robin_Watts> Lelldorin1: If you're still here (can't see from discord) then there are a couple of choices. | 22:23.20 |
| <Robin_Watts> First and simplest is to use GhostPDL rather than Ghostscript. It's designed to be as close to Ghostscript as it can be, but it automatically copes with a range of different inputs, including PS/PDF/PCL/PXL/XPS/JPG/PNG etc. | 22:24.07 |
| <Robin_Watts> Alternatively, checkout viewjpeg.ps, supplied in the 'lib' directory of gs. | 22:24.55 |
| <Robin_Watts> That's a PS program that will read and display (at least some) jpegs. Use that with pswrite, and you can convert jpeg -> PS. | 22:25.30 |
| <<<Back 1 day (to 2021/04/14) | Forward 1 day (to 2021/04/16)>>> | |