Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2018/03/04)20180305 
chrisl cybrNaut: pdfimage8 and co are not in a Ghostscript release, yet - unless you have built from source pulled from out git repo, the device won't exist07:42.32 
cybrNaut chrisl: ok, thanks. what i'm doing now is converting from PDF to PPM, and back. Guess that's the best option19:13.43 
  (using pdftoppm and imagemagick)19:13.58 
ray_laptop cybrNaut: BTW, you can use gs for both steps: gs -sDEVICE=ppmraw -o temp.ppm ... in.pdf then: gs -sDEVICE=pdfwrite -o out.pdf -dSCALE=1 -- lib/biewpbm.ps temp.ppm20:08.42 
cybrNaut ray_laptop: thanks, i might prefer that20:18.49 
  it's annoying that ImageMagick downsamples it w/out me telling it20:19.04 
  so I have to "convert source.pbm -density 600 -units pixelsperhinch target.pdf" just to keep the dpi at 60020:19.40 
  i'm surprised I would need -dSCALE=1 in the cmd you give, but at least it relieves me of having to hardcode dpi20:20.39 
ray_laptop cybrNaut: I'll have to check what the default downsampling is for pdfwrite. (kens would know right off, but I don't). Just a sec.20:28.59 
  cybrNaut: OK according to https://www.ghostscript.com/doc/current/VectorDevices.htm#PDFWRITE DownSample***Images is false by default. 20:35.21 
cybrNaut sounds sensible20:35.36 
  that lib/biewpbm.ps looks a bit cryptic20:36.33 
  maybe it's normal.. i don't have a lot of gs experience20:36.52 
Robin_Watts cybrNaut: That's postscript. Cryptic is good. :)20:38.55 
ray_laptop so the source image from the ppm will be sent through to pdfwrite by viewpbm.ps and it will be in the final PDF. I tried with: gswin32c -r600 -sDEVICE=ppmraw -o temp.ppm examples/colorcir.ps ; gswin32c -sDEVICE=pdfwrite -o out.pdf -- lib/viewpbm.ps temp.ppm20:40.29 
  and the output PDF has an image that is 5100 x 6600 pixels, as expected20:41.19 
cybrNaut sounds good.. i'm just about to try it20:41.40 
  it's in a script, so i guess I should add -q -dNOPAUSE -dBATCH20:41.58 
ray_laptop cybrNaut: -o accomplishes the -dNOPAUSE -dBATCH as well as setting the OutputFile20:42.59 
cybrNaut ok, cool20:43.12 
ray_laptop but -q might be nice20:43.13 
  I have to run an errand. I'll check back in a bit20:43.34 
cybrNaut i ended up with 300 dpi. I had -r600 in the rasterization cmd, but didn't think I needed it in the PDF containerization20:43.54 
ray_laptop Robin_Watts: I find that I get a lot of false problems trying to use Mememto with a multi-threaded gs. the gs_heap_free_block unlocks the monitor *BEFORE* calling "free" so Memento is unprotected when it tries to maintain its freelist20:45.09 
Robin_Watts ray_laptop: Does memento not have a monitor of its own?20:45.39 
ray_laptop I'm dying in Memento_Internal_makeSpace20:45.44 
  Robin_Watts: I don't see one20:46.25 
  Robin_Watts: I have to run an errand. bbiaw20:46.39 
Robin_Watts ray_laptop: oops. Yes, we appear to be missing that.20:47.27 
cybrNaut https://paste.gnome.org/pleqh8fkp <= pbm to pdf not working20:53.08 
  strange that my script does not error.. but when I run that on the CLI it falls over20:54.22 
Robin_Watts biew ?20:56.18 
  view20:56.20 
cybrNaut it's lib/biewpbm.ps in both my script and CLI as ray_laptop gave it.. but I'll switch20:57.38 
  when I switch to lib/viewpbm.ps it behaves just the same (no error in the script but results in 300 dpi, and cli error is the same as pasted)20:59.21 
  https://paste.gnome.org/paymwqmsm <= with viewpbm.ps.. basically the same result21:00.48 
Robin_Watts Ok, so it's complaining that it can't find the script lib/viewpbm.ps21:02.23 
  I'm guessing that's because you're not in the gs directory?21:02.35 
  Use the correct path to the script.21:02.45 
cybrNaut ok.. i just figured it knew where to root that21:03.16 
  but strange that in a script it doesn't complain, and generates something21:03.58 
  will use /usr/share/ghostscript/9.20/lib/viewpbm.ps21:04.15 
  error is gone, but seems to be upsampling to 720dpi21:06.02 
  err, no actually it's always downsampling to 300dpi21:07.44 
  720 was another test21:07.56 
  produces a PDF that contains a 300dpi image => gs -sDEVICE=pdfwrite -q -dSCALE=1 -r600 -o raster.pdf -- /usr/share/ghostscript/9.20/lib/viewpbm.ps raster_600dpi.pbm21:09.33 
  it should be 600 dpi.. I even supplied "-dSCALE=1 -r600" to force 600dpi21:10.14 
  the rasterization works correctly, so it's the conversion back to pdf that fails to maintain the resolution21:11.13 
  wtf.. it all works on the CLI => https://paste.gnome.org/ps1exjeit21:24.23 
  but only if I include "-dSCALE=1 -r600" on the final step (which should be implied IMO)21:24.45 
  okay, sorry the script had a bug.. so the script works the same as the CLI21:30.47 
  but still a mystery that I need "-dSCALE=1 -r600"21:30.57 
ray_laptop back now22:19.56 
  Robin_Watts: should I open a bug about Memento MT ?22:20.18 
  (and assign it to you, of course ;-) )22:20.34 
 Forward 1 day (to 2018/03/06)>>> 
ghostscript.com #mupdf
Search: