IRC Logs

Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2013/04/24)2013/04/25 
ray_laptop bmpcmp didn't help me on the cups differences. At least for the psdcmyk I am able to see what's going on -- the 'equivalent_cmyk_colors.color[sep_num].color_info_valid is false in the device I clone for the bg printing :-(04:18.00 
  I have to figure out how to copy that data across into the cloned bg_print device (safely)04:19.11 
  I don't know if there is a way to do this. This is a private element of some devices (such as psdcmyk). I probably have to do something similar to what we do for devn_params (which is the same kind of thing)04:32.10 
  i.e., add a "ret_equiv_colors" device proc that will give me a pointer then make an equivalent to devn_copy_params that does the copy_equiv_colors action. I want to consult with mvrhel to see if there is any shortcut, or if this will even work.04:34.51 
  It will probably work if the device uses the standard update_spot_equivalent_cmyk_colors with the standard equivalent_cmyk_color_params struct in the device that the device will return a pointer to from its ret_equiv_colors proc04:39.43 
  work on it (and consult with mvrhel) in the AM when I'm fresh and coffeed up04:40.58 
mvrhel_laptop ok. so I am calling my mupdf with C# through my c++ winrt component 05:20.46 
  I think I see what we will need to do to make this work with ghostscript05:21.09 
  we will need to create it in in visual studio though as a separate project outside the normal build process. So you will want to take and create a windows runtime c++ component and create an interface to the gs library. then you can create apps in c++ javascript c# etc that can call into gs 05:24.08 
  henrys: no sure if you want paul to get bogged down with that or not. I think I could do it relatively quick (a day)05:25.02 
  s/no/not/05:25.11 
  the problem is though that we can only do this in windows 8 and with visual studio 201205:25.44 
  so it would be a separate little solution project05:25.52 
  but that is fine05:26.10 
  at least it gives our customers an interface to gs for windows store apps05:27.07 
  in what ever language they want to use05:27.19 
natronite good morning05:28.26 
  we use mupdf on android and sometimes we have the issues that it does not render the page correctly. What happens is that the text is in a light gray color instead of black and the pictures (which I assume usually have a transparent background) have a gray background05:29.41 
  does anyone know what could be the issue here?05:29.48 
mvrhel_laptop uhoh I see ray_laptop had some issues that he wants to chat about in the morning. done for the night so I can get some sleep05:30.03 
  natronite: mupdf folks will be on in a few hours05:30.22 
natronite no hurry :p05:35.15 
  ..06:47.07 
  we use mupdf on android and sometimes we have the issues that it does not render the page correctly. What happens is that the text is in a light gray color instead of black and the pictures (which I assume usually have a transparent background) have a gray background08:31.25 
  does anyone know what could be the issue here?08:31.31 
kens natronite : when you say 'sometimes' do you mean the problem is inconsistent (sometimes it happen on a particular file, sometimes it doesn't) or that the problem only occurs with some files, but those files are always incorrect ?08:32.45 
natronite i mean it does not happen every time08:33.11 
  if I render the same file again a little later it renders fine08:33.42 
kens Well that sounds like some kind of display list problem, and I'll have to refer you to the real MuPDF developers. tor8 ping ?08:34.10 
natronite what also happens on other files is that several characters are renderes as rectangles08:34.38 
kens That sounds like the well known 'TrueType /.notdef' problem. I would imagine the fonts are not embedded in the document.08:35.12 
tor8 natronite: I've never seen that before. could you open a bug on bugs.ghostscript.com and attach the file?08:35.14 
  fonts not rendering properly is almost always because the font isn't embedded and there isn't enough reliable information in the pdf file to create a proper substitute08:36.14 
natronite so why does it render correctly when I render it other times?08:36.37 
kens natronite : are we talking about the fonts or the gray ?08:36.55 
tor8 natronite: that would probably be a bug. we are supposed to be deterministic :)08:37.01 
natronite the gray and the fonts are two different things08:37.16 
  some files get gray text and images08:37.25 
kens natronite : yes, which is why I was asking.08:37.28 
natronite and other files have rectangles while the text color is fine08:37.38 
kens I'm assuming the 'rectangles' is deterministic, that is it is always the same08:37.46 
natronite both aren't. Sometimes the file with the rectangles renders fine08:38.35 
kens OK so that is interesting indeed.08:38.45 
natronite I'll make screenshots to add to the bug I'll report08:38.54 
kens More important is the relevant file. THis sounds like it will be difficutl to pinpoint though, unless you can provide a means to reproduce the problem reliably08:39.27 
natronite true. Let me explain what I do08:39.53 
kens That sounds like a good idea, yes08:40.11 
tor8 natronite: if you're on a linux machine, I would suggest running mupdf in valgrind and see if that spots anything08:40.12 
kens tor8 he did say Android08:40.23 
natronite Using minizip I copy the memory of the needed file into memory to create a stream which I can use to open a document08:40.26 
  because the files we display are within a minizip08:41.11 
  I mean within a zip file08:41.19 
  and it's faster to extract the needed files on the run than to extract the whole archive beforehand08:41.53 
tor8 natronite: that's a supported workflow, so nothing strange there08:44.29 
natronite sadly I'm on os x08:45.14 
  but I can extract the zip on the phone08:45.48 
  and open it with the mupdf app08:45.53 
  the unzipped version opens fine every time in mupdf09:03.06 
kens2 chrisl ping11:42.22 
pgogna Robin: I tried the idea you have given and found the bounding box at the position where i double tapped on the pdf12:36.01 
  But I doubt whether i am getting correct bounding box or not?12:37.02 
Robin_Watts pgogna: hi.12:49.58 
  Well, if it was me, I'd zoom the page in until a piece of text just filled the screen widthwise, then I'd click it and look at what value I got back.12:50.46 
pgogna There are two different steps. So lets goto step by step13:00.48 
  step 1. Please ensure if i am getting correct bounding box?13:01.26 
  Step 2. Calculate scaling factor to zoom to that bounding box13:02.18 
Robin_Watts pgogna: Right, so step 1.13:02.33 
  zoom the screen using the ordinary zoom functions in mupdf so that a line of text just about fills the screen widthways.13:02.57 
  Then double click that text, and look at the bbox you get back.13:03.10 
pgogna ok13:03.33 
  I was trying to print the text inside the bbox so that i will get the idea of what that bbox contains13:06.36 
  And Step 213:06.51 
Robin_Watts that seems reasonable too.13:06.53 
  We'll talk about step 2 after you have step 1 working.13:07.16 
chrisl kens2: (belated) pong13:31.51 
kens2 chrisl no worries, the problem went away, I got a omilefail on feet, but a retry and it was OK13:32.13 
  compilefail*13:32.23 
chrisl Hmm, I've been seeing a few spurious build failures - if it carries on, I'll maybe ask marcosw to see if we can gather data to work out why.....13:33.20 
kens2 The error was a memory error, just aa mo13:33.36 
  It was building gsromfs1.c and said:13:34.26 
  cc1: out of memory allocating 67108864 bytes after a total of 18354176 bytes13:34.26 
  make: *** [obj/gsromfs1.o] Error 113:34.26 
Robin_Watts it got 18meg, and balked at a further 67 ?13:35.09 
kens2 I' also seeing "TERM environment variable not set." here and when doing bmpcmp and compiles13:35.18 
chrisl Yeh, I don't think the TERM variable one is anything to worry about13:35.38 
kens2 No, just mentioning it in passing, it seems not to cause problems13:35.52 
  If you want the full log for the fail I still haveit for now13:36.04 
chrisl No, not just now. But if it comes up more times, let me know13:36.29 
kens2 OK13:36.35 
mvrhel_laptop good morning13:53.00 
kens2 Robin_Watts : ping13:54.32 
mvrhel_laptop paulgardiner: did you make any progress on the winrt stuff? I dont know if you saw my earlier comment, but I believe I know what needs to be done13:56.01 
  or at least on approach13:56.17 
  s/on/one/13:56.21 
paulgardiner No. Haven't seen your comment. I've been experimenting trying to link a simple win32 dll into a winrt dll. I've read on the net that that can be done, which may mean no special build needed for gs, just removal of calls to no-longer-existing APIS13:58.43 
  Don't seem to have received your comment. I thought I was on the lists now.13:59.20 
mvrhel_laptop paulgardiner: oh it was from yesterday perhaps13:59.37 
kens2 Possibly it was on irc ?13:59.42 
mvrhel_laptop yes on irc13:59.50 
  paulgardiner: in the irc logs13:59.59 
kens2 paulgardiner : you need to look at the irc logs14:00.00 
mvrhel_laptop from today14:00.01 
paulgardiner ah right14:00.08 
mvrhel_laptop to me this approach I described sounds a little easier than hacking away at our build scripts14:01.31 
paulgardiner Ok. That sounds good, but does he need to call directly to gs from C#. Is his winrt dll written in C# or something? (Excuse me if that makes no sense. I may be misunderstanding something completely).14:02.42 
mvrhel_laptop paulgardiner: he could write an application in c#, c++, javascript etc and create the winrt object in his app and make calls into gs 14:04.03 
paulgardiner I thought he'd already split off a dll and wanted gs in a separate dll, which he called from the first14:04.58 
kens2 I understadn his problem to be that he can't call the GS API (from a managed code application) because its has no winmd file.14:05.41 
  THe GS DLL that is.14:05.56 
mvrhel_laptop ok. I guess I misunderstood what he wanted. if he is not in a windows store app the that is fine. if he is in a windows store app then I suspect we need to do things the way that I described14:06.45 
paulgardiner mvrhel_laptop: I wouldn't say that. I suspect you were probably right. I'll just read the emails again a minute.14:07.29 
mvrhel_laptop to be able to call from managed code into gs will require the creation of a windows runtime component 14:07.47 
kens2 I must admit its somewhat opaque to me. My understanding has been that he has written an application using managed code (c# for example) and wishes to call the GS DLL from that application, in the wya he is used to with a C app.14:07.49 
mvrhel_laptop at least for a windows store app14:07.59 
pgogna Am i doing correct to get the instance of current loaded page?14:08.00 
  this is what i am doing pc = &glo->pages[glo->current]; page = pc->page;14:08.11 
mvrhel_laptop kens2: if he is working in a windows store app, he is not going to be able to do that without having gs wrapped up in some way as a windows runtime object14:08.51 
  have to help get kids out door. bbiab14:09.13 
kens2 mvrhel_laptop : I was under the impression it was a (coding) language problem, but I am not at all certain14:09.27 
paulgardiner Yes. I think he needs to create a windows runtime component, but it may be possible to have gs in a seperate win32 dll, to which the wr component makes calls14:09.57 
pgogna can anybody help me14:10.01 
kens2 But my feeling was that we would require to wrap the DLL in different code to get it to work though14:10.02 
paulgardiner ... or at least there seems to be claims of that set up being possible on the net.14:10.22 
kens2 Well, that would be nice if true, since we wouldn't then have to set up a new component14:10.45 
  just for 'windows store apps'14:10.53 
  But if we have to do so I guess we can, its not really any worse than the hoops required to set up a DLL.14:11.21 
paulgardiner Some one posted that they'd tried using their 2008 built win32 dll directly from their wr component, and it didn't work, but then did when they rebuilt the win32 dll in 201214:12.15 
  The wr compoent linked with .lib file from the win32 dll build.14:12.46 
kens2 Hmm. I guess that would meanus building with VS 2012, that won't beentirely popular no doubt14:12.59 
paulgardiner All this subject to my not having completely misunderstood something.14:13.00 
mvrhel_laptop right. it really would not be too hard to do. can make a new solution for vs2012 that uses the gs library14:13.04 
  we def. have to use vs 201214:13.09 
kens2 I'm sure chrisl will be delighted14:13.41 
  as it happens I have a VS 2012 project for GS14:14.03 
  had to make one for that customer the other day with the thread local storage problem14:14.26 
mvrhel_laptop well kens2 we dont need all of gs wrapped up in vs201214:14.27 
  we use the current build to create the library14:14.39 
  and have a very small vs 2012 solution that creates the windows runtime componenet14:14.57 
kens2 Hmm, ok14:15.05 
mvrhel_laptop and the gs library14:15.06 
  it is a separate thing14:15.15 
  excuse me14:15.24 
  it uses the gs library 14:15.30 
kens2 'gs library' is a DLL or something else ?14:15.31 
mvrhel_laptop well I would prefer a static lib14:15.45 
  I think that you may have to do that14:15.54 
kens2 Right, so its pretty much what I expected14:16.08 
mvrhel_laptop so we use the existing make stuff to make the static lib14:16.21 
  and have a VS2012 solution that make the windows runtime component14:16.44 
  and raed uses that to make his calls from c# etc14:16.54 
kens2 Actually Raed could do this himself,it seems to me14:17.08 
mvrhel_laptop ye14:17.12 
  s14:17.13 
  Like I said earlier it can probably be done in a day14:17.38 
kens2 weshoudl probably do it and give him instructions, then discuss it at the staff meeting to see if we think we should support this ourselves14:17.47 
mvrhel_laptop with a coffee break and lunch thrown in14:17.48 
pgogna Robin: pc = &glo->pages[glo->current]; page = pc->page; Is this correct to get the current loaded page instance?14:17.49 
kens2 mvrhel_laptop : yes its pretty much what I expected, just like a different kind of DLL14:18.16 
Robin_Watts pgogna: That's under android?14:18.24 
mvrhel_laptop kens2: right14:18.36 
pgogna yes14:18.41 
Robin_Watts sounds plausible, yes.14:19.36 
pgogna But i am getting the text of second page in the bounding box14:20.21 
Robin_Watts pgogna: The first page in the document is page 0, right ?14:20.53 
pgogna If i double tap on first page then i am getting the text of the bounding box of second page14:21.08 
  yes14:21.57 
  Its 014:22.12 
Robin_Watts pgogna: are you call run_list or run_page ?14:23.07 
pgogna I called fz_run_display_list14:23.41 
Robin_Watts Right, so where did you get the display list you are passing to it ?14:24.00 
paulgardiner Ah here it is "To make more clear, if you have X.dll which calls GS.dll (both are WinRT dlls), it will not be possible for X.dll to load GS.dll unless you have winmd file added to the winRT APP."14:26.09 
pgogna I am passing the page_list from page_cache returned by &glo->pages[glo->current]14:26.57 
paulgardiner So we might suggest that, rather than trying to build both X.dll and GS.dll as WinRT dlls, he might build GS.dll as a win32 dll and link from X.dll using the .lib file.14:27.36 
  Ah! mvrhel_laptop went to lunch. I forgot.14:28.08 
kens2 making a 'proper' winrt component just seems the right thing to do14:28.40 
Robin_Watts sorry, I missed all that while I was out running, then went for lunch without seeing it.14:28.55 
  AIUI, Raed is NOT trying to call from C# or .net or whatever.14:29.19 
pgogna Robin_Watts: I get the page_list from page_cache that is returned by &glo->pages[glo->current]14:29.21 
kens2 Robin_Watts : so why does he need a winmd file then ?14:29.35 
Robin_Watts kens: He says that he wants to have his own dll, X.dll, make calls to gs.dll.14:30.02 
  but in order for him to put both X.dll and gs.dll into a "windows store app", he needs winmd files for BOTH dlls.14:30.21 
kens2 but from what paulgardiner syas, he can do that14:30.29 
Robin_Watts kens2: It's quite possible that Raed is wrong.14:30.50 
kens2 I am puzzled, but then what do I know ?.....14:31.04 
  Of course, he can't do it using our .dll anyway because that's not built with VS 201214:31.25 
Robin_Watts What we need to be able to do is to authoratatively show that he is wrong.14:31.31 
paulgardiner I'm working on it, and perhaps close14:32.05 
Robin_Watts kens2: Our existing build scripts support us adding "METRO=1" to the nmake calls, to make the required build changes.14:32.18 
kens2 I'm still inclined to feel that making a winrt component is the right thing to do anyway14:32.18 
Robin_Watts and I have a VS2012 project, that I've shared with paulgardiner 14:32.33 
paulgardiner On msdn: "You can use Visual Studio 2012 to create either a standard Win32 DLL or a Windows Runtime component DLL that can be consumed by Windows Store apps"14:32.40 
Robin_Watts (just a copy of the VS2005 one with METRO=1 added in the appropriate places)14:33.04 
paulgardiner He may not be able to call it, but he will be able to "consume" it!14:33.13 
Robin_Watts paulgardiner: I'm not sure I agree with your reading of that.14:33.30 
  I'm still catching up with the logs.14:34.09 
paulgardiner Ah right. What might it mean.14:34.09 
kens2 I think we need to consider that MS are definitely pushing people to using managed code, and our 'wrapping' GS up in a winrt component makes that easier, we should think about doing it14:34.41 
  Provided its not a lot of effort, and michael seems to think it isn't14:34.54 
paulgardiner "A standard DLL that was created by using an earlier version of Visual Studio or an earlier version of the Visual C++ compiler may not load correctly in a Windows Store app and may not pass the app verification test in the Windows Store."14:34.54 
Robin_Watts Right. What mvrhel_laptop suggests sounds like a good plan. It's something worth having and it expands the uses for gs. But I'm not sure it helps with Raeds problem.14:35.27 
kens2 Ah, well that's a differnet issue :-)14:35.43 
mvrhel_laptop I think that is what Raed is going to have to do also and live with14:36.02 
kens2 He will need to make his 'x.dll' a winrt component as well ?14:36.29 
paulgardiner I thought his x.dll was a winrt component.14:37.01 
Robin_Watts paulgardiner: Right. My reading of the problem was that x.dll was a winrt component.14:37.38 
kens2 Possibly at this point we should get Raed to send a concrete (skeleton) exmaple of what he needs so we cna run some tests14:37.42 
paulgardiner msdn has instructions for migrating existing dlls. We could just point him at those instructions.14:38.35 
kens2 Presumably that incolves rebuilding the DLL ?14:39.02 
pgogna Robin_Watts: Could you please help me to achieve what i am trying to14:39.21 
paulgardiner kens2: Yes, but not adding explicit interfaces or putting on a c++ wrapper14:39.40 
  Or needing to generate a winmd file14:39.55 
kens2 I get the feeling he wants to void rebuilding GS14:40.00 
Robin_Watts pgogna: I am confused as to why what you are doing is not working.14:40.11 
kens2 paulgardiner : I'm guessing he thinks that if he uses the standard DLL he cna give us bugs, and that if he rebuilds it we'll shrug and say 'show it on standard GS'14:41.26 
pgogna ok that means i am doing it correctly14:41.27 
Robin_Watts paulgardiner: "msdn has instructions for migrating existing dlls" - so those instructions would be for what he needs to do to alter the way X.dll is built ?14:42.15 
paulgardiner Alter the way gs is built, I thought.14:42.35 
  gs.dll14:42.41 
kens2 If x.dll is a winrt component, I'm assumign he would nbeed to rebuild GS14:42.46 
Robin_Watts paulgardiner: Then why would we point him at those instructions? Surely *we* should be following those instructions?14:43.03 
kens2 Robin_Watts : if we are supporting winrt yes, hence my poitn that we should offer a winrt component.....14:43.31 
Robin_Watts kens2: Offering a winrt component is one thing (and I agree that it would be a good thing to offer).14:43.54 
kens2 Its probably as much effort as migrating (and maintaining) a DLL14:44.26 
paulgardiner Robin_Watts: yes, I see what you mean; I was thinking of the continuation of the process where you were suggesting build options to him.14:44.42 
Robin_Watts If we need to take steps to ensure that the existing gs.dll can be called *in the same way as it currently can* from windows rt components, then we should do that too.14:44.47 
  Palming that off to a customer feels like poor service to me.14:45.01 
kens2 Robin_Watts : but can that same DLL then be used by non-winrt components ?14:45.09 
paulgardiner No fine. That's what I've been working towards.14:45.23 
kens2 especially applications built with earlier versions of VS....14:45.35 
Robin_Watts kens2: I don't know for sure, but they sound like different jobs to me.14:45.36 
kens2 Robin_Watts : if the DLL after being migrated can't be used by older applications, tehn I don;t really see the point14:46.00 
  better to do it as a component I'd have thought (assuming that the component can be uzsed the way the DLL woujld have bneen)14:46.35 
paulgardiner AFAIK the msdn suggesting builds an ordinarey win32 dll usable from anything.14:46.37 
kens2 Well, if that works, it makes sense14:46.50 
Robin_Watts kens2: I think our reading of the situation is diffrent here.14:46.59 
kens2 Robin_Watts : yes, which is why I thought getting a skeleton applicatin from Raed might be helpful....14:47.28 
Robin_Watts I believe the situation is that Raed has an app that wraps ghostscript. And he's integrated the clever 'guts' of his app into a DLL.14:47.33 
  The idea is that he can then have a thin application that runs on Win32 to call the DLL which calls through to GS and everything is happy.14:48.03 
  Now, he wants to get that working on Windows 8.14:48.13 
kens2 wRight, but we seem to be confused over whether that (x.dll) is a winrt component or just another dll14:48.21 
Robin_Watts He'd expect to have to rewrite the thin application for windows 8 (possibly by using C# or something).14:48.48 
paulgardiner I believe he has a winrt version of x.dll14:48.56 
Robin_Watts That will mean that he needs to tweak X.dll to be a winrt thing. All makes sense so far.14:49.10 
  Why should he have to rework the X.dll -> GS.dll code though?14:49.22 
kens2 but we don't know for sure, I still thnk asking him for a skeleton probject would show us for *certain* what he is doing14:49.30 
Robin_Watts kens2: Indeed, a skeleton project would help clarify this.14:49.48 
  but if what I have just described is correct, then:14:49.56 
  1) a winrt component for gs.dll, while desirable in it's own right, will not help raed avoid work.14:50.16 
pgogna Robin_Watts: can you look at my function http://pastebin.com/abnzZU5G to get the bounding box of enclosed point?14:50.17 
Robin_Watts 2) we should take steps to ensure that gs.dll can be called in the old way (assuming they aren't massively onerous).14:50.56 
kens2 Robin_Watts : yes, I agree with both, but I think we need to know which one Raed actually needs, and if *either* will solve his problem14:51.23 
Robin_Watts kens2: Right.14:51.34 
  So paulgardiner could write a mail to Raed introducing himself, describing what he's discovered, the possible routes forward and asking for clarification on exactly what Raed needs?14:53.28 
  paulgardiner: Words of 2 syllables though.14:53.40 
kens2 Yes, but if it was me I would explicitly ask for a simple sample project14:53.53 
Robin_Watts right. That too.14:54.07 
kens2 the 'x.dll' need be nothing more than a simple 'passthrough' to GS, as long as it replicates what he is actually doing14:54.19 
paulgardiner Sounds like a plan14:56.00 
Robin_Watts pgogna: That code looks plausible enough. So you're clicking on page 1 of the document, and you're seeing it report "glo->current : 0" and yet the text it reports is from page 2?15:09.04 
pgogna I click on page 1 and it reports "glo->current : 1" and reports text of 2nd page15:10.59 
Robin_Watts Right. The pages are numbered from 0.15:11.47 
  so if you click on page 1, then you should hope for glo->current = 015:12.02 
pgogna And next time when i click then it reports "glo->current : 2" and reports the correct text..15:12.43 
Robin_Watts Eh?15:13.04 
  When glo->current = 2 it reports the text from page 1?15:13.13 
pgogna yes!15:13.23 
Robin_Watts I don't understand that :(15:14.18 
pgogna And even more when i move to page 2 and hit there then it reports "glo->current = 0" and reports text from 3rd page15:14.54 
Robin_Watts Try calling gotoPageInternal(desired page num) before processing the click ?15:15.42 
  Ah, no. core.gotoPage(page)15:16.25 
pgogna ok let me try15:16.51 
Robin_Watts If you look in MuPDFCore.java, a lot of functions always call gotoPage(pageNum) before then doing stuff.15:17.12 
  searchPage being one of them.15:17.24 
mvrhel_laptop brb15:21.31 
pgogna Yes i got it and It worked15:21.36 
Robin_Watts pgogna: Fab.15:22.03 
pgogna but still glo->current giving strange numbers15:22.05 
Robin_Watts pgogna: Right. Don't worry about glo->current if it's consistently giving the right results.15:22.26 
pgogna Now lets come to step 215:23.11 
  Now i found the correct rect on which user double tapped15:23.33 
Robin_Watts pgogna: I have an email to write to a customer which has to take priority. Let me do this first.15:23.42 
  In the meantime, find me an example bbox that you get returned, and the current page transformation that goes with it.15:24.13 
pgogna But how do i calculate the scaling factor as i am scaling it in android and then rendering the page15:24.14 
  ok no problem 15:24.39 
  catch you later with the info you want15:25.20 
Robin_Watts pgogna: ok.15:27.46 
  paulgardiner: Muahahaha!15:51.24 
ray_laptop I guess mvrhel is still on kid delivery 15:51.27 
Robin_Watts I was cluster testing the old version. New version looks fixed. Thank heavens!15:51.53 
Robin_Watts slows the fans on peeves a bit by killing his tests.15:52.54 
paulgardiner Robin_Watts: Phew!15:53.52 
ray_laptop chrisl: I wonder if we should default to GS_USE_MEMORY_HEADER_ID=0 in release builds. The information is not really very useful in non-DEBUG builds is it ?15:55.27 
  and it does is take up space, in release builds15:55.53 
Robin_Watts ray_laptop: I suspect that it may be useful in non-DEBUG builds, but that's not to say that it should default to be on.15:59.51 
henrys made it to st louis16:02.51 
ray_laptop Robin_Watts: it might be possible to glean some information out of the header if we get a SEGV from a release build, but I'm sure our first approach to a reported problem is to try a DEBUG build, and only if we can't reproduce the problem, try a release build, but since the object sizes are larger with the header, the allocation pattern will change16:03.29 
Robin_Watts ray_laptop: So it sounds like you're arguing for having it default to being on in release builds :)16:04.05 
ray_laptop and the allocation pattern with release and debug builds is already slightly different due to things that are added for debug builds16:04.05 
henrys bbiaw16:04.05 
ray_laptop Robin_Watts: no, I'm trying to say (and not doing it well) that we aren't likely to try and dig into a problem on a release build, so why have the HEADER_ID16:05.14 
chrisl ray_laptop: I figured a memory diagnostic tool which changed the memory layout was of very limited use, and most workstations are hardly short of memory these days16:05.23 
ray_laptop IMHO, it would be quite difficult to trace around using GDB or something on a release build.16:06.14 
  chrisl: but DEBUG and release builds alreaddy change the memory layout16:06.47 
chrisl ray_laptop: why? The pattern of allocations should be largely the same16:07.19 
Robin_Watts ray_laptop: But we've all been in the position of having to in the past, right? It's specifically for such things that the ID is useful.16:07.34 
ray_laptop chrisl: and we do still have embedded customers that are memory sensitive16:07.37 
chrisl ray_laptop: which is why it's easy to disable - for those cases when memory is tight16:08.00 
ray_laptop Robin_Watts: right, so being ABLE to build it for a release build may be something that we resort to iff we can't get it to fail on a debug build16:08.32 
pgogna Robin_Watts: Do you have time to help me now?16:08.40 
Robin_Watts pgogna: 2 minutes, then sure.16:08.49 
pgogna Ok as i have got the info that you want.16:09.08 
chrisl ray_laptop: but then we get a memory bug report, oh I'll enable the header ID - problem disappears......16:09.22 
kens2 I'm inclined to agree16:10.23 
Robin_Watts what chrisl said.16:10.37 
ray_laptop chrisl: marcosw usually tries to reproduce on a release build. Then when (me, and probably most of us) start to look into it we generally use a DEBUG build16:10.39 
Robin_Watts ray_laptop: And if we can make it fail under the DEBUG build, then great.16:10.57 
ray_laptop I've rarely seen problems that are not reproducible on a DEBUG build.16:11.16 
Robin_Watts but if we can't, I'd *way* rather be working with a release build with the header ID in than without.16:11.17 
kens2 nods16:11.26 
  and I have seen many cases that will not fila on a debug build16:11.43 
Robin_Watts ray_laptop: Most problems I see that happen in the release build, but not in the debug build are indeterminisms from the cluster.16:11.53 
kens2 I';vew debugged several while doing this PCL work16:11.54 
ray_laptop poor kens2 (I hate those)16:12.08 
kens2 ray_laptop : they were segv so not a huge problem, I built a profile version and reproduced them there16:12.30 
chrisl ray_laptop: The last few gc problems I worked on went wrong in the same way in a release and debug build, but *any* other change made the problem disappear16:12.52 
ray_laptop kens2: the profile build had the symbols, so you could get more info, right. You are lucky that the problem didn't go away then (I've seen that, but also rarely)16:13.32 
kens2 yes, but since it was a segv it was sever enough not to go vanish (these *were* real problems)16:13.58 
Robin_Watts pgogna: Go for it.16:14.05 
ray_laptop well, the UK contingent seems in consensus. Just wanted to have it discussed.16:15.43 
pgogna Robin_Watts: Page resolution: PageWidth=1224 and PageHeight=158416:16.46 
ray_laptop chrisl: BTW, did you see my email about the other devices that use fseek and either check for seekable in a (potentially) non portable way, or don't even check. I was going to mention it here, but you weren't on IRC anymore16:16.50 
pgogna Rect Corners : A(98.000000; 170.147781) and B(489.823669; 228.707779)16:16.56 
ray_laptop chrisl: the one that is probably the only important one to fix is gdevpsu.c16:17.48 
  since that is a supported and modern device16:18.02 
chrisl ray_laptop: I didn't, no. I did originally add code to gdev_prn_open_seekable() but I was concerned about unforeseen side effects16:18.16 
ray_laptop I don't feel strongly about digifax and sgi deviecs16:18.27 
Robin_Watts pgogna: What device are you on?16:18.27 
pgogna Device resolution is width = 54016:19.19 
chrisl ray_laptop: your mail was filtered (wrongly) by one of my mail filters - I read it properly tomorrow, and have a look at the other devices. I have to finish now....16:19.21 
pgogna height = 96016:19.25 
chrisl s/I read it/I will read it....16:19.38 
pgogna Device name sony experia P16:19.39 
ray_laptop chrisl: OK. Thanls16:19.43 
  or Thanks16:19.50 
kens2 ray_laptop : see my email I have a fix in place for gdevpsu.c16:19.51 
  chrisl also see my email16:20.04 
Robin_Watts pgogna: OK, so the X extent of that bbox is from 98 to 489.16:20.06 
ray_laptop kens2: I didn't see your email, sorry.16:20.09 
  when was it ?16:20.15 
chrisl_away kens2: got it, too, yes - thanks16:20.17 
kens2 ray this morning16:20.24 
pgogna Yes correct16:20.26 
kens2 (my time)16:20.28 
Robin_Watts which seems plausible for screen coords of 0 to 540, right?16:20.37 
ray_laptop is looking for ken's email ...16:20.53 
kens2 ray_laptop : 11:57 UK time, I guess that would be 03:57 your time16:21.01 
Robin_Watts (i.e. you've got about 100 pixels to the left of the text, and about 50 to the right)16:21.06 
kens2 went to you and cc'ed to tech16:21.09 
  and chris16:21.17 
ray_laptop kens2: Ok, have it now. Thanks.16:21.31 
kens2 NP16:21.35 
Robin_Watts pgogna: So, what was the page transformation that you fed in for that ?16:21.47 
  i.e. the "current matrix" that you fed into run_display_list ?16:22.22 
ray_laptop kens2: obviously it isn't urgent. It just irks me to have different methods to do the same thing. There's enough of that in GS already.16:23.12 
kens2 ray_laptop : agreed, but it was so simple I decided to just do it, also the code is practically identical to chris's16:23.35 
pgogna fz_run_display_list(pc->page_list, dev, &fz_identity, &afz_infinite_rect, &cookie); This is what i am doing with the call to run_display_list16:24.54 
  It doesnot have any matrix?16:25.09 
Robin_Watts You're feeding in fz_identity.16:25.20 
  That means that the bboxes you are getting back for the text are not in screen coords.16:25.54 
pgogna yes its an identity matrix16:25.55 
Robin_Watts They are in document space.16:26.03 
  You need to feed in the current page transformation matrix. I did go through this all yesterday.16:26.22 
pgogna fz_matrix fz_identity = { 1, 0, 0, 1, 0, 0 }; this is what i am sending16:26.48 
ray_laptop kens2: right. I think the only one that worked differently was the vms one (don't ask me why). VMS is so rare, it hardly warrants adding a gp_ function instead of just doing it the psdu way, but this makes porting to strange filesystems on embedded products easier16:27.06 
kens2 Yes, completely agree.16:27.25 
Robin_Watts pgogna: Look in mupdf.c at "drawPage"16:27.46 
kens2 and if we need it for more than pswrite, tehn we should make a proper library call16:27.47 
  (as chrisl has done)16:27.57 
Robin_Watts lines 684 to 692.16:28.14 
  There we calculate "ctm" (current transformation matrix)16:29.07 
  And we pass that into display list.16:29.18 
  That way you'll get rectangles out that are screen coords.16:29.35 
  OR you can stick with sending fz_identity, but you'll then need to transform the bboxes you get back to allow for the current zoom and the current x/y translation.16:31.32 
pgogna Are you talking about running this code? http://pastebin.com/7CSpCfkc\16:36.28 
  How do I get bbox before I run this code and pass the fz_identity to run display list?\16:37.11 
kens2 ok goodnight all16:38.09 
Robin_Watts pgogna: Right. That code you just pasted will take a rectangle in document space to one in screen coords.16:39.28 
  So if you feed fz_identity into the display list, you'll get bboxes back in document space.16:39.51 
  So you'll then need to feed those bboxes through that code to get them converted to screen coords.16:40.21 
  Then you can test to see if the point you clicked is within them.16:40.49 
  Does that make sense ?16:40.56 
ray_laptop hi, mvrhel_laptop 16:44.33 
  mvrhel_laptop: did you see my problem description in the logs (at the top) ?16:44.56 
pgogna I think I understand what you are saying, What you mean is that in my current flow of code, I should take the retuning bbox and run it through the code I just shared with you. After that I will have the new bbox coordinates which are already transformed to the current device resolution and zoom level.16:45.07 
Robin_Watts Yes.16:45.18 
  At the moment, without scaling the returned bboxes, the bbox for a given piece of text won't change depending on how you zoom/pan it.16:47.16 
pgogna ok I understand this. I am clear. This is basically a fix to a problem that if we scale, zoom the pdf than our bbox coordinates are not accurate. This is fine. However I still need to understand the next step. Once I have the BBox than what should be my next step to find the scaling factor ?\16:48.47 
Robin_Watts pgogna: Well, look at the piece of code you just gave me.16:49.33 
  That code shows how to build a transformation matrix that transforms a given 'document space' rectangle into a screen space one.16:50.19 
  You need to run that process in reverse.16:50.46 
  To start with you have a bbox (x0, y0) -> *x1,y1)16:51.19 
  To start with you have a bbox (x0, y0) -> (x1,y1)16:51.23 
  and you want to set the zoom in such a way that that bbox fills the screen widthways, yes?16:51.46 
  actually, where did you get that code from?16:53.11 
  It looks like you're scaling twice.16:53.29 
  oh. I see.16:56.30 
  The second scale is just to ensure that we get whole pixels out.16:56.41 
pgogna Which code you are talking about?16:56.44 
Robin_Watts pgogna: OK, ignore that.16:57.02 
  So, let's assume that you have a bbox: (x0, y0) -> (x1, y1) and you want to adjust the zoom so that that fills the screen widthways, right?16:57.46 
pgogna Yes16:57.56 
Robin_Watts So the width of the bbox is w = x1-x016:58.07 
  Let's 'unzoom' that to get back to document space.16:58.46 
  document_space_w = w * 72/glo->resolution16:59.06 
  Now, we want to find what the new resolution should be, such that it would map that width to be the screen width.16:59.52 
  i.e. if screen_width = document_space_w * new_res / 72, what is new_res ?17:00.27 
  rearrange to get: new_res = screen_width*72/document_space_w17:01.00 
  So you need to set glo->resolution = new_res17:01.15 
  Does that make sense?17:01.30 
pgogna So what i understood is that, first i need to find out the bbox width and then applying it in the above equation will give me new resolution and set this new_res to current res will zoom the page17:04.42 
Robin_Watts pgogna: Yes.17:05.05 
  I am sure that there will have to be work done to make sure that the x/y position of the page is correct too.17:05.35 
  and now I'm confused. Hold on, let me confer with a colleague.17:07.54 
pgogna Ok.. meanwhile let me try what you said earlier17:08.47 
Robin_Watts ok, resolution is a constant. You don't want to mess with that.17:13.27 
  ok. Ignore resolution. It's a complete and utter red herring. We should clear that out of the code.17:16.47 
  The important bit is in the second part of that code.17:17.08 
  The ctm is calculated so that it scales the pagebbox to be pageW wide.17:17.59 
pgogna so how will actual scale happen?17:18.59 
Robin_Watts You need to modify the settings so that in future we ask for pageW*screen_width/w17:19.03 
pgogna what settings?17:19.30 
Robin_Watts The page size/position calculations are all done in the java layer.17:19.39 
  and when we call drawPage, we pass in the desired size of the complete scaled page (pageW, pageH) and the bbox to redraw.17:20.05 
  So you need to pass screen_width/w back up to the java layer and apply it there.17:20.27 
  You need to read and understand the java stuff. It's not in my head at the moment, and I can't spare the time to go trawling through it in detail.17:23.26 
  essentially, each Page has a PageView, I think, which knows the size/position of itself.17:24.02 
  zooming/panning works by changing the size/position of each pageview.17:24.29 
  You need to somehow get the data up from your bbox detection into changing the pageview size/positions.17:24.59 
pgogna Ok, So you are trying to say that take the rect to java layer and perform zoom from there17:25.22 
Robin_Watts yes.17:25.30 
pgogna I tried that and used " scaleFactor = 0.95f/Math.max(rect.width()/metrics.widthPixels, rect.height()/metrics.heightPixels); " to calculate the scaling factor17:27.08 
Robin_Watts tor8: ping17:29.18 
ray_laptop mvrhel_laptop: Are you still around ?17:30.45 
Robin_Watts tor8: Many reviews for you on robin/master (all except the last one good to go, I think)17:31.13 
mvrhel_laptop ray_laptop: sorry on phon17:31.23 
ray_laptop I think I found a way to handle equiv_colors that doesn't need a new device proc. 17:31.27 
mvrhel_laptop I will call you back17:31.31 
  on hold....17:31.35 
ray_laptop mvrhel_laptop: or you can just chat here if you want (when you are off the phone)17:31.55 
  (that'll make henrys happy, who encourages us to chat here so others can monitor and maybe learn something)17:32.30 
mvrhel_laptop since I am on hold I can chat now here if you want.17:32.56 
Robin_Watts Your call is important to us.17:34.16 
Robin_Watts hums some musak.17:34.32 
ray_laptop Robin_Watts: even worse than musak (muzak?) is when they play some top 40 radio station that even has commercials and noisy songs17:44.19 
Robin_Watts There was one place in the UK that used to play star trek sound effects. It was great :)17:45.01 
mvrhel_laptop ok. finally done with that17:45.51 
  yes. the commercials are bad17:46.10 
ray_laptop mvrhel_laptop: so, the devn_[get put]_params functions have pequiv_colors but don't really ever write the equiv_colors to the param_list, and don't do anything in 'put' except clear the 'valid' flags17:47.56 
pgogna Robin_Watts: can you tell me any way to highlight the bounding box for debugging purpose?17:48.36 
ray_laptop mvrhel_laptop: what do you think about adding the equiv_color cmyk values and the valid flag to the param list so the put_params will set it ?17:48.48 
mvrhel_laptop ray_laptop: I believe that would be a good thing since it keeps it from being this oddball special thing17:49.24 
ray_laptop OK. I'll look at doing that17:50.06 
mvrhel_laptop where was henry off to these 2 days?17:50.28 
ray_laptop It keeps me from having to add a new device proc17:50.31 
mvrhel_laptop ray_laptop: yes17:50.39 
ray_laptop mvrhel_laptop: he mentioned St. Louis in the logs today, but I don't know if that is where he was stopping, or just a checkpoint17:51.12 
  mvrhel_laptop: any suggestions on the param name (I assume it will be an arrray). And do you think an array of N*5 numbers (where N is the number of valiid equiv_colors) is OK ?17:54.15 
Robin_Watts pgogna: You can invert sections of pixmap I think.17:54.39 
mvrhel_laptop ray_laptop: is 5 for CMYK + alpha?17:54.58 
Robin_Watts void fz_invert_pixmap_rect(fz_pixmap *image, const fz_irect *rect);17:55.21 
ray_laptop mvrhel_laptop: the struct cmyk_color_s doesn't have alpha17:55.29 
pgogna where can i find that part of code?17:55.42 
mvrhel_laptop oh 5 for the index + CMYK?17:55.59 
ray_laptop mvrhel_laptop: actually, the first 'valid' bool is in case a sep gets added and its info is still not valid17:57.22 
mvrhel_laptop ray_laptop: oh ok. valid. that is right17:57.36 
ray_laptop storing it as a number is just a hack to have the array be homogenous17:57.57 
mvrhel_laptop yes17:58.03 
ray_laptop (well mixed). oops17:58.05 
  homogeneous ?17:58.17 
mvrhel_laptop something like equiv_cmyk_color would makes sense to me17:58.28 
  or equiv_color is fine17:58.43 
  if we dont want to be explicit about a color space17:58.55 
ray_laptop mvrhel_laptop: since it is an array of N colors, then equiv_cmyk_colors seems good. Also if we are writing bool(int), C, M, Y, K then beiing explicit about the colorspace seems OK17:59.58 
mvrhel_laptop ray_laptop: sounds good to me18:00.15 
ray_laptop mvrhel_laptop: would you object to ".EquivCMYKColors" (a few other non-standard params have an initial ".")18:02.30 
mvrhel_laptop ray_laptop: I would not object to that18:02.51 
ray_laptop anybody else want to weigh in?18:02.55 
  mvrhel_laptop: thanks. I think I'll try this approach then.18:03.16 
  probably some CET that dumps all the device params will pop up with a diff, but that's easy.18:04.29 
  mvrhel_laptop: YUCK. I think I remember tripping over this in the past. The devn_get_params seems like it is just a placeholder dummy function18:17.16 
mvrhel_laptop ray_laptop: that whole devn parameters stuff is a big mess and could do with some serious rewrite18:18.13 
ray_laptop mvrhel_laptop: looks like I drew the short straw :-(18:18.35 
  of course, I could just do like I did with PageSpotColors and just add what I need for now (the precedent has been established ;-) )18:20.15 
Robin_Watts ray_laptop: If you leave it just a bit nicer than it was when you arrived, you can consider yourself on the side of sainthood :)18:21.00 
mvrhel_laptop yes. sort of like with camping. leave it better looking than when you got there18:23.57 
chrisl ray_laptop: I was thinking about the positional file fix for the TIFF devices, and the more I thought it, the more I think the fix *should* go in gdev_prn_open_printer_seekable() - I don't think it should be able to silently ignore the seekable flag.18:33.52 
ray_laptop chrisl: that's fine with me. Except we still have to fix up (or get rid of) the dfax and sgi devices since they don't call gdev_prn_open_printer_seekable in their open (as gdevtifs and gdevtfax do). 18:40.57 
  but having the check in one place make sense to me18:42.02 
chrisl ray_laptop: cool, I'll do that tomorrow - and fix up the errant devices, too18:42.35 
  ray_laptop: and thanks!18:43.32 
ray_laptop chrisl: of course, ken's change is still valid because he just emits different code (BoundinBox: atend) if the output file is not seekable18:51.03 
chrisl ray_laptop: oh, okay, I might need to tweak it to ignore an error message.18:52.26 
  error code, rather18:52.37 
Robin_Watts tee hee. I've got a fix for the vertical text motion bug in mupdf. It's superbly random. Tor will hate it.19:02.02 
  tor8: Another review on robin/master for you then.19:16.22 
tor8 Robin_Watts: I believe I tried that one already. have you localclustered it?19:20.38 
Robin_Watts tor8: I have. You can see the bmpcmps currently.19:20.52 
tor8 maybe I flipped the same sign elsewhere then...19:21.13 
Robin_Watts essentially rounding errors in about 4 files.19:21.17 
  actually...19:22.16 
  What I tried initially was leaving it as - but using abs() on the font size.19:22.35 
  and that gave 24 differences (4 files).19:23.07 
  but I don't think my latest bmpcmp worked.19:23.22 
  Let me retest it.19:23.25 
tor8 yeah. locally on the test files it has the same problems as my initial attempt...19:24.21 
Robin_Watts yeah, I think the version with abs is the right one.19:25.09 
  Like I say, pretty random.19:25.18 
  I'll fix my commit.19:25.29 
tor8 Robin_Watts: do you recall if you (or paul) have changed the x11 main event loop since 1.1?19:26.01 
Robin_Watts I won't have done.19:26.15 
tor8 it looks like the dirty flag lazy expose event updating doesn't work as it should anymore :(19:26.24 
Robin_Watts paulgardiner might have updated it to cope with text entry for forms?19:26.37 
  but actually that doesn't work on linux yet, does it?19:26.52 
tor8 it can't have been, that's just using gets() I think19:27.01 
  maybe the slide show transitions changed something?19:27.17 
Robin_Watts Possibly :(19:27.26 
  Company 530 prodded me today to ask about the mesh stuff.19:27.48 
tor8 realized the tax declaration deadline was looming so my brain got fried doing that today :(19:29.13 
Robin_Watts ah. I lose 1 day a quarter to accountancy crap :(19:29.43 
  OK, updated patch on my repo.19:30.23 
  I'll rerun the tests for sanitys sake.19:30.31 
tor8 if it really is abs() then it's absurdly random and I'll love it :)19:31.05 
Robin_Watts :)19:31.22 
tor8 Robin_Watts: yeah, you broke the x11 app with the transitions :(19:36.37 
  Robin_Watts: while (... XPending()) you changed to while (... XPending() && !dirty)19:37.27 
  which forces it to drop out of the loop as soon as it's flagged dirty, and forces a new blit19:37.44 
  where before it'd eat all events and *then* blit once it's idle again19:37.57 
  Robin_Watts: check tor/master for a potential fix (that might break transitions, I haven't tested those)19:41.43 
Robin_Watts tor8: sorry.19:45.42 
tor8 I take the blame, I should have caught it in the review19:47.36 
Robin_Watts ok, so we should find a way to fix transitions too.19:50.27 
  probably it should be && (!dirty || !transition_mode) or something.19:50.50 
  I'll look into that tomorrow.19:52.48 
  can we hold off on your commit til then?19:53.13 
  at the moment everything works, just slowly.19:53.53 
tor8 yes, we can wait for a proper fix19:55.47 
ray_laptop mvrhel_laptop: I have the separation colors coming out of psdcmyk correctly now with BGPrint20:04.31 
mvrhel_laptop ray_laptop: great!20:04.49 
ray_laptop souping up the devn_get_params and devn_put_params was enough20:06.06 
  now I have the cups stuff to look at.20:07.42 
  hmm... looks like all of the cups diffs I have to looked at so far are multi-page files. The honked up cups device probably makes assumptions that aren't valid w/ BGPrint20:20.12 
  time for a lunch break20:20.23 
Guest55135 Hello22:19.58 
ghostbot hey22:19.58 
Guest55135 Is there anyone here? I'm trying to fix a problem22:23.10 
  using the tiffpack device is giving me an error22:35.57 
  other tiff devices work fine22:36.13 
  I'm using 9.0722:36.16 
 Forward 1 day (to 2013/04/26)>>> 
ghostscript.com
Search: