IRC Logs

Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2016/05/15)20160516 
HenryStiles kens: I saw the new coverity problems for the macro expansion: no good deed unpunished ;-(13:16.38 
kens Actually I fully expected it13:17.24 
  THere were already those same warnings, but hidden in macros. I figured it would be easier to fix them by sorting the macros out first13:17.53 
HenryStiles oh good , btw I think you were missing an inline keyword in one of the declarations, I said so in the logs but it was buried in a lot of other stuff.13:20.00 
kens Chrisl mentioned it, I had spotted it at the time, and carefully kept the email, then threw it away somewhere along the line. If you can remember which one it would be good to know, otherwise I'll just have to look13:21.00 
Robin_Watts store_sample12 IIRC?13:27.03 
  or sample_store12 ?13:27.11 
HenryStiles kens: sample_store_next12 line 27713:27.15 
tor8 Robin_Watts: okay, I've hooked up the display list images for SVG images in HTML/EPUB14:52.48 
  getting garbage images out :(14:52.57 
  Robin_Watts: nvm, I figured it out. we forgot to clear the pixmap before rendering, and I'd misunderstood the intent of the transform matrix entry15:01.36 
Robin_Watts tor8: Ah, fab :)15:01.44 
tor8 now, to figure out how to get it to render at a decent resolution rather than just 72 dpi :)15:02.06 
Robin_Watts I have the pixmap stride stuff working.15:02.30 
tor8 nice!15:02.37 
Robin_Watts and the alpha removal stuff is getting there.15:02.47 
tor8 Robin_Watts: so... the caching of decoded pixmaps from images is preventing us from re-rendering the svg at the device resolution each time the pixmap is requested15:17.13 
Robin_Watts tor8: Oh, cos we rescale from the bitmap we have?15:17.59 
  hmm.15:18.02 
tor8 yeah.15:18.05 
Robin_Watts So, maybe we shouldn't cache the decoded pixmap for that sort of pixmap.15:18.26 
  Ok, so fz_pixmap has alpha, interpolate and free_samples.15:20.07 
  All of which could be uchars rather than ints.15:20.21 
  (actually, yours won't have alpha).15:20.28 
  We could add an 'uncacheable' one in there too?15:20.44 
  and then in fz_get_pixmap_from_image we skip the last fz_try block if it's set?15:21.39 
  Or rather than fiddling with fz_pixmap, we could just return a flag from the get_pixmap call ?15:21.59 
  which might be nicer.15:22.06 
tor8 yeah, it feels a bit icky to set that flag there. I'd rather have the flag in the fz_image then15:22.25 
Robin_Watts tor8: It doesn't need to be an externally visible flag.15:22.44 
  It's just an extra int *cache field to the internal image->get_pixmap function.15:23.13 
tor8 a dontcache flag in fz_image we set for display list images would work for me15:23.20 
  or an extra out-parameter from image->get_pixmap15:23.37 
  either one15:23.43 
Robin_Watts the latter is nicer, I think.15:23.44 
tor8 yes15:23.51 
Robin_Watts cos the behaviour of the image cache is no ones business but image.15:24.04 
tor8 another problem is we clamp the requested w,h to image->w,h15:25.55 
  in the subarea stuff15:26.03 
  we can solve that by setting the w,h to be something at 600 dpi and the xres/yres to 60015:26.23 
  but that also feels a bit hacky15:26.29 
Robin_Watts Yeah.15:26.33 
  We can have a flag in the image to say "variable size image", and use that to not clamp the image w/h.15:27.28 
  Under such sircumstances the w/h would just indicate the size at the "native" dpi (for aspect ratio purposes)15:28.18 
tor8 if we do have a 'resolution independent image' flag, we can use that to avoid caching as well15:28.19 
Robin_Watts yeah.15:28.25 
gregf_ hello15:50.27 
ghostbot Welcome to #ghostscript, the channel for Ghostscript and MuPDF. If you have a question, please ask it, don't ask to ask it. Do be prepared to wait for a reply as devs will check the logs and reply when they come on line.15:50.27 
gregf_ is this channel active please?15:50.36 
  im using ghostscript to convert from pdf to jpeg, but on the production box a conversion takes far too long(approx 20 minutes)15:51.34 
  s/20/30/15:51.42 
kens Why do you thnk that's too long ?15:51.50 
  Its going to depend on the size of the PDF< the complexity of the content and the resolution of the output15:52.12 
gregf_ on my dev box(where gs version is 9.10 ubuntu 4.04 LTS) it takes 1.29 minutes15:52.13 
  kens: sure15:52.21 
kens THen there's somethign different about the other system15:52.25 
gregf_ the live box is ubuntu 12.10(gs version 9.06)15:52.40 
  kens: sure, there is a diff in the boxes15:53.03 
kens Well there's problem 1, you aren't comparing the same versions of Ghostscript, and both of them are out of date15:53.04 
  Current version is 9.1915:53.16 
gregf_ kens, well sure15:53.17 
  kens: so another question then :)15:53.28 
kens Well if it were me, the fist thing I would do is make sure I was comparing apples to apples15:53.36 
gregf_ is it possible to upgrade to 9.19?15:53.37 
kens Yes15:53.40 
gregf_ er, i;ve asked too many questions. was the Yes for the upgrade?15:54.05 
kens Yes, you can upgrade15:54.11 
gregf_ *smiles*15:54.19 
chrisl You probably can't upgrade via apt though15:54.33 
gregf_ but kens, another question before the upgrade15:54.35 
  yeah, yeah, sure - not via apt-get15:54.47 
  the next question: the docs says under #Improving performance# : -c 30000000 setvmthreshold -f15:55.16 
  that does_not produce the output file15:55.30 
  it runs in 30 seconds, sure, but no output file15:55.48 
  :|15:55.50 
kens And no error ?15:55.55 
gregf_ nope15:56.09 
kens Well if you can reproduce that on current code you can report it as a bug and someone (probably not me) will look at it15:56.28 
chrisl With "-c" etc the parameter order is important15:56.59 
gregf_ oh15:57.14 
  well this is the command i'm running:15:57.23 
  time gs -c 30000000 setvmthreshold -f -dUseFastColor=true -dNOGC -dPDFFitPage -dBATCH -dNOPAUSE -dNOPROMPT -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dUseCIEColor -r150 -sDEVICE=jpeg -sOutputFile=/tmp/vms/1463394710577412/%d.jpeg /tmp/vms/1463394688349499.pdf -c quit15:58.08 
  s/time//15:58.13 
chrisl Yeh, not going to work15:58.17 
kens Yeah bad order15:58.20 
gregf_ oh15:58.24 
kens Also *don't* use -dUseCIEColor unles you know *exaclty* why you are using it.15:58.48 
gregf_ please if you could tell the proper order15:58.54 
  ah - sure. i'll take that one off15:59.04 
kens Move the -c...-f to the and, just before the input file15:59.12 
  drop the -c quite off the end15:59.25 
gregf_ ok15:59.28 
chrisl gs -dUseFastColor=true -dNOGC -dPDFFitPage -dBATCH -dNOPAUSE -dNOPROMPT -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r150 -sDEVICE=jpeg -c "30000000 setvmthreshold" -f /tmp/vms/1463394688349499.pdf15:59.31 
kens -c quite*15:59.32 
gregf_ *gives that a whirl*15:59.36 
kens bah *quit*15:59.36 
gregf_ sure :)16:00.01 
chrisl I'd also urge not using -dNOGC - that's a really bad idea.......16:00.26 
kens There's probably no point in -dTextAlphaBits or -dGraphicsAlphaBits for JPEG output, all that will do is make the output still blurrier IMO16:00.47 
gregf_ oh16:00.57 
  well, im just doing it by trial and error(from the docs(16:01.10 
  s/(/)/16:01.16 
kens But its subjective, and people disagree with me. But I'd try it without16:01.21 
gregf_ sure, you know better than i do ;)16:01.37 
kens Try the simplest possible command line is my advice, only add other stuff if you are sure you know why you want it16:01.47 
gregf_ ok16:01.59 
  so do you suggect just : -dNOGC -dBATCH -dNOPAUSE -dNOPROMPT16:02.24 
  *suggest16:02.29 
kens do *NOT* use -dNOGC16:02.33 
gregf_ ok, the docs say otherwise :|16:02.47 
chrisl *Our* documentation says about -dNOGC: "Useful only for debugging"16:02.47 
kens That's a debugging only switch, the documentation says so16:02.49 
gregf_ aha - only debugging16:02.54 
  by, debugging, does it mean the stuff printed to the STDOUT?16:03.26 
kens If you use -o instead of -sOutptuFile you get all of -dNPAUSE and -dBATCH for free16:03.27 
  No, by debugging it means, well, debugging16:03.40 
  Trying to find and fix faults16:03.50 
gregf_ well, i'm a developer, so for me debugging is like stepping through/over. *you probably too are a dev* 16:04.14 
chrisl It means if you are debugging the "internals" of Ghostscript16:04.14 
kens we're all developers here :D16:04.45 
gregf_ heh16:04.49 
  o/16:05.02 
  let me try what you've suggested16:05.14 
  also, upgrading it to 9.19 would improve performance?16:05.29 
kens Maybe, maybe not16:05.36 
gregf_ hmm, ok16:05.50 
kens Its hard to remember all the changes over the years16:05.53 
  9.10 is 2 years old, I can't really remember if there were any performance changes16:06.25 
gregf_ ok, its surely faster than 9.06 apparently16:06.43 
kens 9.06 is 3 years old16:06.44 
  There's no reason to expect dramatic improvements in performance unless you hit a corner case and we happen to have worked on it.16:07.09 
chrisl 9.06 was probably using jasper.....16:07.11 
kens The code is mature, mostly stable, and doesn't often get startling performance enhancements16:07.29 
gregf_ hmm, stability is more important :|16:07.43 
kens Well, if it was using JasPer, and the input has JPEG2000 images, then there will be an improvement16:07.52 
  But 3 years on, I can't remember16:08.20 
  Frankly I have trouble rememberig last Monday, so.....16:08.33 
gregf_ heh16:09.50 
  ok, i've run this now: time gs -dNOPROMPT -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r150 -sDEVICE=jpeg -o/tmp/vms/1463394710577412/%d.jpeg -c "30000000 setvmthreshold" -f /tmp/vms/1463394688349499.pdf -c quit16:10.45 
  completed in 36 seconds. which is faster by 1.30 minutes16:11.02 
kens Almost certinaly down to not converting all colours into CIE colour spaces and back to device space16:11.26 
gregf_ is that all i need, would: -dUseFastColor=true -dPDFFitPage help?16:11.42 
  hmm16:11.44 
  oh - ok16:11.59 
kens -dPDFFitPage won't do anything useful unless you set a fixed media, which you aren't doing16:12.10 
gregf_ sure16:12.18 
kens You could use -dUseFastColor, at the expense of colour fidelity16:12.26 
gregf_ and the textAlphaBits..16:12.28 
  ok16:12.46 
kens Text and Graphcs AlphaBits are a matter of taste, in general I don;t like the result. When going to JPEG I really don;'t like the result16:12.55 
gregf_ well, yeah, i dont need them either16:13.34 
kens I rather doubt the vmthreshols is helpiung, but t might, by reducing memory thrashing. YOu could try taking it off, but it shouldn't cause nay harm16:13.42 
HenryStiles hmm I just noticed I'll be at the lake district over the holiday, is it very crowded, is the traffic bad? I guess it doesn't much matter now other than to know what I'm in for.16:13.59 
kens HenryStiles : it will be more crowded over a holiday, is it the late May Bank Holiday you will be there ?16:14.22 
  If so, same rules apply as in the US, go 200yards from the car park and it will be just fine16:14.40 
  But tourist traps will be busier16:15.11 
gregf_ heh, the US is *huge* ;)16:15.12 
kens Yeah, but everyone drives everywhere, just like here, so if you walk away from the car park it magically becomes pleasant16:15.45 
gregf_ well, folks cycle in the UK *ducks*16:16.04 
kens Sure, but those people will be out whether its a holiday or not16:16.21 
  Again, same as in the US16:16.28 
gregf_ yeah - true that16:16.31 
kens On holidays, the tourist places will be busy, but I strongly suspect Henry wants to go running (or walking)16:16.58 
  Or something energetic anyway16:17.05 
Robin_Watts HenryStiles: If you're lucky, it'll be raining, and no one will dare leave home for the mud.16:17.45 
kens Ah, the late May Bank Holiday is much more likely to be nice16:18.07 
  OTOH lake district, there is a clue in the name :)16:18.19 
HenryStiles I guess this year your spring bank holiday is the same day as memorial day, in theory tor8 and sebras should be the only artifex staff members working16:18.20 
kens I always work statutory holidays16:18.35 
Robin_Watts Likewise.16:18.41 
  It's not like we can do anything fun (like visit the bank) on those days.16:19.05 
HenryStiles yes I've noticed that.16:19.06 
kens HenryStiles : I'm pretty certain it will be good for you no matter what, but avoid the towns and tourist destinations on that weekend if you are at all worried16:19.24 
HenryStiles heading to Ambleside, I imagine that is a tourist destination.16:20.45 
kens Um, yeah I would say so16:21.10 
  Pretty though16:22.13 
HenryStiles kens: I may rent a wet suit and swim, they say it's popular there.16:23.32 
Robin_Watts HenryStiles: I dunno how easy it is to rent wet suits.16:24.07 
kens No idea, but I doubt many people will be with you. Best be careful where you swim, there are ferries there16:24.14 
Robin_Watts When I went to the Lakes (which was admittedly 20+ years ago), I don't recall wet suits being available. We just swam without.16:24.53 
kens There's a place that renst them16:25.07 
HenryStiles I got a brochure, I believe from Helen, that advertised it16:25.46 
kens Capernwray dive centre, but that's not Ambleside obviously16:25.48 
  http://www.mytrievents.co.uk/wet-suit-hire/16:26.10 
  They do advertise swimming in Lake Windermere16:26.19 
HenryStiles Robin_Watts: I'd think in that kind of lake you could dip in for a while, but a long swim wouldn't be comfortable.16:27.35 
Robin_Watts I suspect you're right.16:27.46 
kens Swim faster to keep warm :)16:27.46 
Robin_Watts I just wonder if it might be easier to bring your own.16:29.54 
  After all, the weight is nothing compared to the shoes Sabrina will be bringing, right? :)16:30.13 
HenryStiles Robin_Watts: very good point16:30.31 
gregf_ oh - he's left :|16:35.32 
  anyways, kens, chrisl : thanks very much for your inputs. much appreciated!16:36.02 
chrisl gregf_: NP16:36.27 
gregf_ chrisl: please if you could thank kens too! ;)16:38.21 
chrisl gregf_: this channel is logged, kens will see it when he reviews the logs tomorrow16:39.05 
gregf_ cool, cheers!16:41.04 
ferter Hi everyone! i've faced a stumbling block and i'm wondering if you could help. i'm working with mupdf and what i'm trying to do is to save highlight annotation. everything works just fine, except for one particular thing, - when i open my saved document in foxit reader, instead of blending colors, i see my highlight laying over the text. so i'm assuming i'm making a mistake in my AP. and thus, i seek your help. thanks for your ti16:45.06 
  http://my.jetscreenshot.com/demo/20160516-7pdd-24kb16:45.23 
Robin_Watts Yeah, that looks wrong.17:39.40 
 Forward 1 day (to 2016/05/17)>>> 
ghostscript.com
Search: