| <<<Back 1 day (to 2014/08/19) | 2014/08/20 |
kens | jogux : have you sorted out your flights and travel for the Chicago trip ? | 08:18.33 |
jogux | kens: yep, I think arrive about 4pm on the Thursday and fly out sometime on Sunday | 08:19.03 |
kens | Ah, I was going to offer a room here if you needed it, we're near Gatwick airport. But I'm flying out on Wednesday | 08:20.48 |
| So you;d have to make your own way to Heathrow instead of coming with me, so that's no help | 08:21.10 |
jogux | ah, thanks :) I've going via amsterdam actually | 08:22.01 |
kens | Ah, doing lie Tor :-) | 08:22.23 |
| like* | 08:22.27 |
jogux | :-) | 08:22.31 |
| heathrow or amsterdam makes pretty much no difference to flight time, but amsterdam is a nicer airport and goes wrong a lot less ime :-) | 08:24.00 |
kens | Probably true, though we came back via the new Terminal 2 last time, which was pretty good (of course being practically empty at the time may have helped) | 08:25.10 |
tomty89 | can i trigger gs to output rasterized (jpeg encoded maybe?) pdf? | 09:01.19 |
| or ps | 09:01.41 |
_ingsoc | Is there a way to change the background color of pdfs in mupdf (for reading)? | 09:01.58 |
| Something like this: http://askubuntu.com/questions/472540/is-there-a-pdf-reader-allowing-me-to-change-background-color-of-arxiv-pdfs | 09:02.09 |
tor8 | _ingsoc: the only thing I can think of is tinting the entire page | 09:09.06 |
| _ingsoc: you could, if you hack the mupdf viewer, postprocess the fz_pixmap to tint it | 09:09.41 |
| _ingsoc: something less reliable is to fill the background color of the page with non-white, but sometimes PDF files add a white rectangle to clear the page themselves | 09:11.01 |
| and that obviously won't work with scanned documents | 09:11.09 |
_ingsoc | Hmmmm. | 09:11.29 |
tor8 | _ingsoc: it should be a fairly minor fix to add, I might be convinced to do it just for curiosity's sake :) | 09:11.48 |
_ingsoc | You should! It's a very useful feature to have. | 09:12.47 |
| Kind of don't want to pull all these KDE dependencies. | 09:20.03 |
| :/ | 09:20.04 |
tor8 | _ingsoc: I'm working on it | 09:20.46 |
_ingsoc | tor8: Hero. :D | 09:21.42 |
tor8 | Robin_Watts: there are two commits on tor/master for review | 09:38.14 |
Robin_Watts | ok. | 09:40.45 |
| lgtm. | 09:42.44 |
_ingsoc | tor8: Did it work? | 10:00.33 |
tor8 | _ingsoc: yes, go ahead and try it out | 10:06.50 |
_ingsoc | tor8: From where? | 10:13.43 |
| And how do I use it? | 10:13.50 |
tor8 | _ingsoc: download and build the latest from git. then just hit the 'C' key (shift-C) to toggle color tinting | 10:14.23 |
| the -C argument will let you set a different color to tint than the default (which is floralwhite) | 10:14.42 |
_ingsoc | tor8: What format does -C accept? | 10:15.21 |
tor8 | a hex triplet | 10:15.29 |
| so -C FFFFF0 or similar | 10:15.45 |
_ingsoc | Still pulling from Git. :P | 10:24.58 |
tor8 | lunches. | 10:25.47 |
_ingsoc | Just "make", right? | 10:31.34 |
| From Git. | 10:31.40 |
| fatal error: X11/Xlib.h: No such file or directory | 10:39.40 |
sebras | _ingsoc: you need to install the libx11-dev package | 10:42.38 |
_ingsoc | sebras: Now it's complaining about XShm.h! | 10:49.41 |
| So that's libxext-dev. If only we had the technology to put these things in some kind of list and put it on the Internet. | 10:52.21 |
Robin_Watts | tor8: if (tint) is giving a compiler warning according to scan-build. | 11:17.24 |
tor8 | Robin_Watts: hm... you're right it's uninitialized :( | 11:30.08 |
| _ingsoc, sebras: you need the xorg-dev meta-package | 11:31.22 |
Robin_Watts | tor8: Could we possibly put something in the makefile? In the X11 target maybe... | 11:38.23 |
| echo "You will require the X11 dev libraries (typically the xorg-dev meta-package). Alternatively, rebuild with NOX11=yes." | 11:39.06 |
tor8 | Robin_Watts: that's the second time in about month we get users who try to build but don't have the knowledge to know that they need the X11 headers and don't know where to get them | 11:39.19 |
Robin_Watts | tor8: Indeed. | 11:39.35 |
tor8 | Robin_Watts: and it's never happened in the first ten years or so | 11:39.46 |
Robin_Watts | We've had people who trip over not knowing about NOX11=yes more frequently than that. | 11:40.08 |
tor8 | Robin_Watts: true enough | 11:40.38 |
| I'm not sure how to make a good makefile rule for that though | 11:40.49 |
| but it's easy enough to add to the README | 11:41.23 |
| Robin_Watts: two more commits on tor/master then | 11:44.57 |
Robin_Watts | MUVIEW := $(MUVIEW_X11_PLUS_WARN) | 11:46.07 |
| MUVIEW_X11_PLUS_WARN := $(MUVIEW_X11) $(X11_WARN) | 11:47.38 |
| X11_WARN :\n\techo "blah blah blah" | 11:47.56 |
tor8 | gcc test.c || echo "STUPID USER! INSTALL X11!" | 11:48.17 |
| which is exactly what gcc already tells you, in a somewhat less rude manner :) | 11:48.40 |
Robin_Watts | tor8: That would be better. | 11:48.47 |
| The key thing, to my mind, is to tell people about NOX11=yes | 11:49.07 |
| if we can also hint that people might want to install xorg-dev too, so much the better. | 11:49.25 |
tor8 | Robin_Watts: yeah. or "make tools"? | 11:49.30 |
Robin_Watts | The two commits look fine. | 11:51.26 |
| I don't follow 'make tools' ? | 11:51.32 |
tor8 | as a shortcut to build the command line tools but not the viewers | 11:51.44 |
| i.e. mudraw and mutool | 11:51.49 |
Robin_Watts | oh, that'd work. | 11:52.00 |
tor8 | instead of 'make HAVE_X11=no' | 11:52.02 |
Robin_Watts | but people will still whinge about "I ran make and it didn't work". | 11:52.20 |
tor8 | well, now we can at least point to the README and ask -- did you install x11? | 11:52.46 |
| which will get trickier when my opengl viewer is done, then we'll need more system libraries :( | 11:53.15 |
jogux | I'll get thumped if I mention autoconf, right? | 11:54.44 |
tor8 | jogux: thoroughly | 11:55.12 |
jogux | just checking :) | 11:55.32 |
tor8 | jogux: :) | 11:55.39 |
chrisl | Much as I hate autotools, I do think there comes a point where they make some sense | 11:56.14 |
jogux | I would have a temptation to make 'make' (no parameters) exit with failure saying something like: | 11:57.13 |
| avabilable targets: tools \n x11viewer \n opengl \n | 11:57.33 |
tor8 | chrisl: given the monoculture of linux today, I'm even less convinced than I was 10 years ago | 11:57.58 |
jogux | the inference being that people that then say 'make opengl' should have a reasonable expectation they need the opengl dev packages :-) | 11:58.18 |
tor8 | jogux: that's probably the best solution (but it'll take years to rewire my fingers to type) | 11:59.05 |
chrisl | tor8: there is Unix-life outside of Linux..... | 11:59.16 |
jogux | tor8: :) | 11:59.38 |
tor8 | chrisl: yes; but 99% of autoconf-using software don't build on anything !linux... | 11:59.42 |
| wasting the entire point of having it | 11:59.50 |
chrisl | Just because most people use it wrongly doesn't invalidate its proper use - autoconf being an unholy, over-complex mess is better at that | 12:01.01 |
sebras | tor8: oh. | 12:44.14 |
kens | tomty89 why do you want a PDF with nothing but an image in it ? | 12:55.24 |
Robin_Watts | It's the modern equivalent of a piece of paper with the time written on it. | 12:56.26 |
tomty89 | kens: i had a huge one (because it got many super high res photos inside it i guess) so i think rasterizing it is a workaround to make it smaller | 12:58.03 |
kens | If you want it smaller, then subsample the images to a lower resolution. | 12:58.29 |
tomty89 | kens: actually it would be even better to make the embed images downscale while keep the text | 12:58.41 |
kens | Yes, that's what I'm saying | 12:58.52 |
tomty89 | kens: but i wonder if that's too ideal, coz i don't have the "source" | 12:59.09 |
kens | The source of what ? THe PDF ? | 12:59.23 |
tomty89 | kens: yeah | 12:59.29 |
kens | Well you'll get a better result starting from the application, but you can send teh PDF through GS to the pdfwrite device and tell it to reduce image resolution | 13:00.00 |
tomty89 | oh really? there's such a switch? | 13:00.54 |
kens | Look at the documentation for ColorImageDownsampleThreshold ColorImageDownsampleType and ColorImageResolution | 13:01.04 |
tomty89 | ok thanks | 13:01.15 |
kens | There are similar controls for Gray and Mono images in case these aren't colour | 13:01.32 |
tomty89 | but just curious, is there a switch to make gs just rasterize the whole pages? | 13:01.59 |
kens | No | 13:02.03 |
tomty89 | i see | 13:02.13 |
kens | If you really want to do that, render the PDF file to an image format | 13:02.16 |
tomty89 | but if i want them to be in a pdf again, i need something else right? like imagemagick | 13:02.58 |
kens | If, after that, it absolutely has to be a PDF, then you can write PostScript code to read the image data and make a PDF from it using the pdfwrite device. Or just open the image in a application and print it or whatever | 13:03.05 |
tomty89 | got it | 13:03.19 |
kens | Oh you'll also need the DownsampleColorImages switch | 13:04.24 |
| Essentially, if DownsampleColorImages is true, then the resolution of images is compared to ColorImageResolution. If the resolution of the image is greater than ColorImageResolution * ColorImageThreshold then we downsample the image to the desired resolution using the ColorImageDownsampleType | 13:05.36 |
| ColorImageThreshold allows you to not bother downsampling images that are 'nearly' the stated required resolution | 13:06.14 |
tor5 | bah. internet died :( | 13:08.40 |
_ingsoc | tor5: Hmmm, the text seems to be behind the -C colour. It's almost like an overlay? | 13:09.19 |
| Is there a way to change the text color and bring it "above" the overlay? | 13:09.39 |
tomty89 | kens: thanks a lot. you are so kind :) | 13:09.41 |
kens | NP | 13:09.46 |
tor5 | _ingsoc: yeah, it's a full-page tint. everything is tinted by the color. | 13:09.55 |
Robin_Watts | _ingsoc: The whole page bitmap is tinted. | 13:09.57 |
| text and all. | 13:10.02 |
tor5 | but black will remain black | 13:10.05 |
Robin_Watts | Is the text black or white? | 13:10.18 |
tor5 | the tint works in combination with inverting (it'll invert first, then tint) | 13:10.44 |
_ingsoc | The text is black and the background is white - like a "standard" PDF. | 13:11.24 |
Robin_Watts | And once tinted, you see the text as being non-black ? | 13:11.51 |
_ingsoc | When it's inverted (and tinted), it looks like the text is behind the tint, not on top of it. | 13:11.52 |
| So I invert, and then tint. | 13:12.06 |
Robin_Watts | right, cos first we invert to give white text. | 13:12.11 |
_ingsoc | Yeah. | 13:12.23 |
Robin_Watts | then we tint, and the whole doc (including the white text) is then tinted. | 13:12.30 |
_ingsoc | So do I tint first? | 13:12.40 |
| And then invert? Or no difference? | 13:12.49 |
Robin_Watts | It makes no difference the order in which you press the buttons. | 13:13.09 |
| The code always inverts (if selected), then tints (if selected) | 13:13.24 |
_ingsoc | To the whole document? | 13:13.41 |
Robin_Watts | Yes, to the whole document. | 13:13.53 |
_ingsoc | Let me try it again on this computer and see if it's any different. The white text just looks a bit dull - it doesn't pop. | 13:14.20 |
| With the tint. | 13:14.23 |
tor8 | _ingsoc: white text on a black background is supposed to be dull with the tint | 13:14.42 |
_ingsoc | Is there any way to just change the background colour? From black to say 2C2C2C, and change the text colour to DCDCDC> | 13:15.45 |
| ?* | 13:15.48 |
tor8 | _ingsoc: not trivially, no. | 13:16.11 |
Robin_Watts | _ingsoc: Yes. Why don't you render to a bitmap, and then photoshop it as required. | 13:16.23 |
_ingsoc | Darn. | 13:16.24 |
| Robin_Watts: Because I want to use it as a feature to read PDFs. | 13:16.38 |
tor8 | I expect you could apply a function to each of the channels, but specifying that function from the command line would be awkward | 13:16.46 |
| like gamma correction | 13:16.58 |
| or photoshop "curves" tool | 13:17.16 |
_ingsoc | Not even Evince has the option, and they're supposed to be an alternative to Okular. | 13:17.23 |
| So it makes it kind of difficult for users who have to read a lot of PDFs. | 13:17.38 |
| Of course, not everybody gets annoyed by black on white. | 13:17.54 |
tor8 | _ingsoc: crank up the brightness setting and lower the contrast on your monitor ;) | 13:17.59 |
Robin_Watts | _ingsoc: Indeed. | 13:18.00 |
tor8 | _ingsoc: I can't read white text on a black background ... it makes my eyes very tired very quickly | 13:18.30 |
_ingsoc | tor8: I'm the opposite it seems. :P | 13:18.57 |
tor8 | but I understand wanting to reduce the contrast a bit (hence my default tint which makes the white a nice off-white yellow) | 13:18.59 |
| _ingsoc: astigmatism ... flooding my eyes with bright light contracts the pupils and makes it a lot easier to focus for me | 13:19.25 |
| white text on a black background and my pupils dilate, and everything becomes a blurry mess or I see double after a while | 13:20.05 |
_ingsoc | I'll just have to live with the KDE bloat for now. We don't have the technology! | 13:23.11 |
tor8 | _ingsoc: it'd be trivial for you to hack the fz_tint_pixmap function to do what you want | 13:23.32 |
| just change "s[0] = fz_mul255(s[0], r)" etc to the function you want | 13:23.58 |
_ingsoc | What file is it in? | 13:24.35 |
tor8 | I'd expect something like s[0] = 40 + fz_mul255(s[0], 255-180) | 13:25.06 |
| source/fitz/pixmap.c | 13:25.12 |
henrys | Robin_Watts, tor8 : I left a message about gray detection on irc after you left yesterday. We do need to the fix for images. | 13:26.47 |
tor8 | henrys: Robin_Watts: okay. it should be trivial to add, I think Robin wanted to jump on that and get away from SOT for a bit? | 13:27.29 |
Robin_Watts | henrys: it's a couple of hours work, if that. | 13:27.31 |
tor8 | do we want to add a fuzz threshold like ken mentioned? | 13:27.57 |
Robin_Watts | tor8: yeah. | 13:28.07 |
| I'll happily do it, or I can leave it to tor. | 13:28.23 |
kens | I htink ray mentioned the threshold | 13:28.36 |
henrys | up to you guys | 13:28.38 |
Robin_Watts | grabs lunch. | 13:28.40 |
henrys | wow upgrading to 8.1 was a disaster, I came back cryptically said it couldnât install and half my apps are gone. Itâs like the old days | 13:29.49 |
tor8 | henrys: apps? don't tell me you're using the metro/tifkam/modern ui/tiles/whatever-it's-supposed-to-be-called... | 13:30.55 |
kens | crap for short :-) | 13:31.14 |
jogux | henrys: impressive :-( | 13:31.34 |
henrys | tor8: just skype, yes maybe itâs best they are gone ;-) | 13:32.10 |
Robin_Watts | henrys: want to log into skype? (If you can?) | 14:03.29 |
henrys | I canât right now can you send me email? | 14:03.55 |
Robin_Watts | henrys: More of a discussion thing, than an email thing. It can wait. | 14:04.21 |
henrys | okay I should be back up and running soon | 14:04.34 |
Robin_Watts | So, tor8: I'm going to look at this color stuff, unless you've already started. | 14:26.04 |
tor8 | Robin_Watts: go ahead | 14:28.56 |
rayjj | kens: tomty89: BTW, gs doesn't need imagemagick to convert some raster image formats to PDF. There are lib/view*.ps files. The most useful for converting a page to an image is probably to use -sDEVICE=pnmraw, then use viewpbm.ps For example: | 15:00.08 |
| gs -q -r300 -sDEVICE=pnmraw -o - examples/colorcir.ps | gs -sDEVICE=pdfwrite -o x.pdf -q -dSCALE=1 -- lib/viewpbm.ps '%stdin' | 15:00.09 |
| the pdfwrite step can have the usual set of pdfwrite settings BEFORE the -- | 15:00.11 |
kens | rayjj I didn't really want to go there..... I felt downsampling images was a better bet | 15:00.55 |
rayjj | Robin_Watts: are you going to add a "tolerance" as well ? Or just look at the non DeviceGray image data ? | 15:01.07 |
| kens: agreed -- it won't degrade the text. | 15:01.24 |
tomty89 | i actually read that in docs, but what will be the encoding/size/quality of the image in the pdf output? | 15:01.55 |
Robin_Watts | rayjj: Yes, a tolerance. | 15:02.09 |
rayjj | the lib/view*.ps helpers are sometimes useful, so I just wanted to bring them to light | 15:02.12 |
| tomty89: if you make a raster image, the -rXXX determines the quality. If you use pdfwrite directly, then read Ps2pdf.htm -- there are "convenience" settings -dPDFSETTING=/___ where ___ is screen ebook printer prepress in order of increasing quality | 15:04.06 |
| tomty89: none of these degrade text in any way, but they have different defaults for image downsampling and filters | 15:04.42 |
kens | would suggest not using PDFSETTINGS unless you fully read the documentation and completely understand what those canned settings do | 15:04.44 |
rayjj | kens: agreed | 15:04.55 |
| but doing them manually is *painful*, IMHO | 15:05.12 |
kens | It is,but people don;t understand what decisions they have taken when they use them, which can lead to unexpected results | 15:05.46 |
tomty89 | i just assumed that pdfwrite would keep what that pnmraw output, which seems to me something uncompressed | 15:06.21 |
rayjj | kens: right -- like different AutoRotatePages settings | 15:06.32 |
kens | No, it will compress the image data according to what you select in the *ImageFilter | 15:06.48 |
tomty89 | oh | 15:06.55 |
kens | (* = one of Mono, Gray, Color) | 15:06.58 |
rayjj | tomty89: for my example post processing, it kept the entire image (no downsampling) and used Flate (lossless) encoding | 15:07.42 |
| tomty89: so, for my example the intermediate (uncompressed) pnmraw file was 24Mb, and the PDF was 212Kb | 15:09.02 |
| thanks to Flate (zip) compression of an example file that had a LOT of white space | 15:09.29 |
| a png of the same starting image is 222Kb (don't ask me why Flate is better than PNG which I thought is also Flate based) | 15:10.55 |
tomty89 | hmm that was a HUGE difference | 15:11.28 |
rayjj | found a fix for bug 695420. Running cluster on it, but I don't expect anything since we don't test ColorConversionStrategy | 16:03.08 |
kens | Hmm henrys isn't here :-( | 17:16.21 |
henrys | Iâm here | 17:16.33 |
kens | Oops sorry henrys | 17:16.40 |
| That PCL mail to support. I'm pretty certain its already fixed, I seem to recall the file works with current code. Don't know what reply you want to send to the free user though | 17:17.13 |
| Obviously Marcos won't reply until next week. | 17:17.34 |
| THis is clearly one that I missed when sifting through the support archive | 17:17.58 |
henrys | kens: Iâll follow up shortly | 17:18.12 |
kens | OK thanks henrys | 17:18.16 |
| Goodnight all | 17:18.21 |
chrisl | I thought that was being referred to Scott? | 17:18.23 |
kens | chrisl I don't recall..... | 17:18.32 |
| Only that I looked at the file and I'm fairly certain it works with current code | 17:18.47 |
chrisl | Yeh, I seem to remember they appear to be in breach of the PCL fonts license | 17:19.18 |
Robin_Watts | interesting. Page 97 of the PDFRM contains a space character, printed in red :) | 17:38.03 |
rayjj | Robin_Watts: how can yo u tell ? | 17:40.20 |
Robin_Watts | Cos the color detection device is detecting it as being colored :) | 17:40.41 |
| urgh. shadings. | 17:46.58 |
| tor8: (For the logs). Revised test-device code up for review. | 19:32.34 |
zeniko | Robin_Watts: (and tor8 FTL): have you ever seen nvareader.com ? | 20:50.38 |
| their apps seem to be based on MuPDF code and sell at quite a price | 20:51.19 |
rayjj | gs pattern painting logic is off by a LOT when the resolution isn't a multiple of 72 -- it ends up taking an entirely different path, so that -Zt doesn't show any "tiling" | 23:03.59 |
| fts_31_3124.pdf is pretty dramatic | 23:04.26 |
| Forward 1 day (to 2014/08/21)>>> | |