IRC Logs

Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2013/05/18)2013/05/19 
vtorri_ Robin_Watts: the functions called are:03:08.56 
  https://github.com/vtorri/ecrin/blob/master/etui/src/modules/pdf/etui_module_pdf.c#L16603:08.59 
  https://github.com/vtorri/ecrin/blob/master/etui/src/modules/pdf/etui_module_pdf.c#L30003:09.20 
  https://github.com/vtorri/ecrin/blob/master/etui/src/modules/pdf/etui_module_pdf.c#L44503:09.37 
  so file_open, then page_set, then render03:09.51 
  also, are those codes :06:46.22 
  http://codepad.org/h8CkY3yu06:46.24 
  and06:46.26 
  http://codepad.org/UDf8wPsU06:46.35 
  equivalent ?06:46.42 
  i mean : should I replace the first one by the second one ?06:47.34 
Robin_Watts vtorri: Lines 503 and 50710:04.19 
  presumably should be width and then height? not width twice ?10:04.30 
  yes, use the second one.10:06.41 
  On the face of it, the code looks OK.10:06.53 
  Except if you're using the display list you'll be regenerating it on every render call.10:07.43 
  Presumably you only want to bin the display list if you're rendering a different page to the last one?10:08.07 
  oh, and you're not setting ctm. That'd be a problem :)10:09.02 
  or rather, you're setting it, but not setting it correctly, AFAICT.10:09.52 
  or maybe you are :(10:12.53 
  I can't see why you don't get anything displayed.10:13.58 
  I think the display list code is wrong in that on every render you 1) make a display list of one doesn't exist, 2) add the page contents to the end of the list.10:14.31 
  which means the display list will get bigger, and bigger, and bigger each time.10:14.51 
vtorri_ Robin_Watts: indeed (for width) !10:25.50 
  Robin_Watts: about the display list, as I use calloc to allocate my big structure, it is NULL10:27.17 
  then, line 467, i create it10:27.33 
Robin_Watts vtorri: OK, so on first entry to render, you make it.10:27.36 
vtorri_ yes10:27.44 
Robin_Watts then you draw into it.10:27.44 
  Next time you render (be it the same page, or a different one), you then reuse the same display list.10:28.05 
  but at no point do you clear the display list.10:28.16 
vtorri_ wel, i don't really know how to use the display list10:28.39 
  i tried to look at mudraw.c10:28.47 
  that's all10:29.00 
Robin_Watts well, presumably you can test without the display list for now ?10:29.05 
vtorri_ yes10:29.11 
  by default, is it indeed disabled10:29.20 
  but in my test program, i have enabled it10:29.45 
Robin_Watts So, if it was me, I'd disable it for now.10:29.58 
vtorri_ ok10:30.08 
Robin_Watts Then I'd pick a text only PDF and try to display that.10:30.17 
  and I'd put a breakpoint on fz_draw_fill_text10:31.03 
vtorri_ ok10:31.46 
  i also have to add all the try/catch stuff10:32.01 
  but that's for later10:32.08 
Robin_Watts You can ignore that for now, yes.10:32.15 
vtorri_ have tried, no luck :/10:32.18 
Robin_Watts Does the breakpoint get hit?10:32.47 
vtorri_ i've fixed the width/height bug and disabled display list10:32.48 
  i have not tried yet10:32.55 
  unfortunately i have to go10:33.00 
  i'll do it when i'm back10:33.06 
  thanks :)10:33.09 
Robin_Watts ok.10:33.21 
  my immediate guess would be that there is something wrong with the transform.10:33.52 
vtorri_ ok10:35.36 
henryto hi all10:35.39 
  anyone knows if it's possible to build GS to run on jailbroken iOS?10:38.36 
vtorri_ btw10:46.52 
  about GS, a guy came here and had problems to build GS on Mac OS X10:47.14 
  i tried to help him, but no luck10:47.28 
  i don't understand, btw, why autoconf is used, but not the other autotools10:48.06 
  arg10:49.25 
  i really have to go10:49.29 
  bbl10:49.32 
henryto for Mac OS there is a precompiled available from MacPorts10:50.14 
_ingsoc How do I enter text into a form with mupdf?16:12.07 
  I can't find any documentation.16:12.15 
vtorri_ tor8, hey16:58.59 
  tor8, would you have some time to review the code of my library, using mupdf, please ?16:59.28 
  tor8, it does not display anything and i don't know why16:59.43 
tor8 vtorri_: link?17:02.28 
vtorri_ https://github.com/vtorri/ecrin/blob/master/etui/src/modules/pdf/etui_module_pdf.c#L16617:02.59 
  https://github.com/vtorri/ecrin/blob/master/etui/src/modules/pdf/etui_module_pdf.c#L30017:03.24 
tor8 vtorri_: what do I need to check out to build?17:03.25 
vtorri_ https://github.com/vtorri/ecrin/blob/master/etui/src/modules/pdf/etui_module_pdf.c#L44517:03.28 
  so file_open, then page_set, then render17:03.36 
  don't try to build the lib17:03.53 
  it requires some libraries taht are not widely available17:04.06 
  tor8, i've not used yet try/catch17:04.34 
  i've disabled display list17:04.42 
tor8 have you tried adding a fz_write_png call to save the pixmap result after the fz_run_page call?17:04.57 
vtorri_ no17:05.05 
  tor8, line 498 ?17:05.28 
tor8 also, print the contents of the ctm matrix you're using and the values of the bbox used to create the pixmap17:05.50 
  often errors like this are due to messing up the matrices so the page is drawn outside the pixmap17:06.17 
vtorri_ tor8, ctm is an array of 9 elts, right ?17:06.21 
tor8 6 elts17:06.27 
  a, b, c, d, e ,f17:06.31 
vtorri_ ok17:06.35 
tor8 abcd are the rotation/scaling part of the matrix, ef are the translation17:06.53 
vtorri_ tor8, i print ctm before or after fz_run_page ?17:07.03 
tor8 the same ctm as you pass into fz_run_page17:07.13 
  fz_run_page does not modify it17:07.18 
vtorri_ ok17:07.21 
  tor8, ctm has these values : 1 0 0 1 0 017:11.55 
  i'm writing the png right now17:12.06 
  ctm is the identity matrixa and no translation17:12.31 
tor8 so pd->page.rotation is 0, and pd->page.hscale, pd->page.vscale are 1?17:14.28 
vtorri_ yes17:15.42 
  by default17:15.46 
  the png is white17:16.24 
  the size is correct17:16.43 
  the pdf is the one in zlib thirdparty dir17:17.12 
  i'm a bit lost...17:20.43 
  tor8, do you find the code of _etui_pdf_render correct ?17:30.24 
  the mupdf parts, of course17:30.41 
tor8 bbox values...17:33.08 
vtorri_ ?17:33.20 
tor8 what are they?17:33.26 
  ibounds and fz_pixmap_bounds17:33.47 
vtorri_ do you mean ibounds ?17:33.49 
  tor8, line 478 and 479, i compute width and height17:34.24 
  i display them just after17:34.33 
  width and height are 595 and 84217:34.46 
  tor8, it's not sufficient ? 17:34.58 
  hmm17:36.28 
tor8 x0 and y0 are they 0?17:36.34 
vtorri_ maybe x0 and y0 are too big17:36.39 
  0 0 595 84217:36.57 
  so seems good17:37.07 
tor8 compare your code with doc/example.c17:38.45 
vtorri_ ok17:38.51 
  btw, the command i used for the png is :17:38.59 
  fz_write_png(pd->doc.ctx, image, "test.png", 0);17:39.01 
tor8 you can add printfs and compare the values between doc/example.c and your code17:39.19 
vtorri_ ok17:39.25 
tor8 I don't see anything obviously wrong with your code, but it could be something subtle17:39.44 
vtorri_ yes17:39.50 
tor8 without being able to run it, it's hard for me to say17:39.52 
vtorri_ or something so obvious we don't see it17:40.01 
  hmm17:40.06 
  if you want to compile the dependency libs : http://git.enlightenment.org/core/efl.git/17:41.03 
  if you're on linux it should not be hard17:41.13 
  on windows, tell me17:41.19 
  there are some commands to pass to configure17:41.29 
  tor8, these libs can achieve these animations : http://www.rasterman.com/files/wp2.avi17:42.29 
  i plan to use them for an "exposé" effect for example17:42.47 
  (for my pdf viewer)17:43.22 
  tor8, the png is correct17:49.42 
  i've misplaced the call of the creation of the png17:49.55 
tor8 right. so the rendering makes the right data at least. that's good to know :)17:50.14 
vtorri_ tor8, so image is correctly filled17:50.16 
  so I have some data that i passsed to mupdf with fz_new_pixmap_with_data()17:50.50 
  image = fz_new_pixmap_with_data(pd->doc.ctx, fz_device_rgb, width, height, (unsigned char *)m);17:50.59 
  whe i run the page, that data (here it's m) is filled with the content of the pdf page, right ?17:51.34 
  when*17:51.37 
tor8 yes17:51.56 
vtorri_ so it's a problem on my side17:52.06 
  tor8, thank you17:52.21 
  tor8, i'll have more questions later, when i fix that problem :p17:52.59 
tor8 vtorri_: what is the pixel format of evas_object_image?17:54.03 
vtorri_ BGRA17:54.16 
  i build a pixel with : a<<24 + r << 16 + g << 8 + b17:55.11 
  well, "I" don't build a pixel17:55.37 
  but it's that format17:55.52 
tor8 the docs on enlightenment.org list a number of EVAS_COLORSPACE_* constants17:55.58 
vtorri_ by default it's BGRA17:56.15 
  i don't modify the colorspace17:56.25 
tor8 EVAS_COLORSPACE_ARGB8888 says high byte is alpha17:57.19 
  high byte on little-endian is first byte17:57.27 
  mupdf renders to RGBA or BGRA17:57.47 
  so you may have the alpha channel swapped with red17:58.00 
  should still draw something, since it's a white background17:58.19 
vtorri_ yes17:58.25 
tor8 but text would be transparent, due to being black17:58.31 
vtorri_ so i might misuse evas17:58.46 
  i feel a bit ashamed because i was one of the main developpers of evas and the other libs...17:59.15 
  tor8, with poppler i have to translate the page with -bbox.y118:39.15 
  tor8, is it the same with mupdf ?18:39.25 
tor8 why do you have to translate it with poppler?18:40.15 
vtorri_ otherwise it's inversed18:42.26 
  or something like that18:42.34 
  i can't remember exactly18:42.41 
  it was a long time ago18:42.46 
tor8 you don't need to do anything like that with mupdf, not sure why you'd think so18:44.01 
vtorri_ ok18:45.09 
  i wanted to be sure18:45.16 
 Forward 1 day (to 2013/05/20)>>> 
ghostscript.com
Search: