[poppler] Followup Bug 32349 & Poppler: More shading fun ;-)

Thomas Freitag Thomas.Freitag at kabelmail.de
Wed Dec 29 02:27:15 PST 2010


Am 29.12.2010 10:52, schrieb Albert Astals Cid:
> A Dimecres, 29 de desembre de 2010, Thomas Freitag va escriure:
>> Am 28.12.2010 16:51, schrieb Albert Astals Cid:
>>> A Dimarts, 28 de desembre de 2010, vàreu escriure:
>>>> Am 27.12.2010 19:40, schrieb Albert Astals Cid:
>>>>> A Dilluns, 27 de desembre de 2010, Thomas Freitag va escriure:
>>>>>> Thanks for immediately starting regtesting.
>>>>>> Thought You're in xmas vacation or have enough to do releasing 0.16.0.
>>>>>>
>>>>>> Here the correction for the artefacts by pdftoppm, I made a small
>>>>>> mistake when optimizing my code.
>>>>> Found some more problems, i found a pdf in which it seems that a circle
>>>>> is not totally filled, sending you the files.
>>>>>
>>>>> Albert
>>>> Playing once again patch ping pong with You. Hope, we can finish the
>>>> game until end of this week :-)
>>>> This PDF was a real headscratcher: Okay, I had some rounding problems
>>>> calculating the size of the bitmap needed for the pattern. But that
>>>> wasn't the main reason. The main reason was that only the half of the
>>>> circles are painted with radial pattern, and the clipping path was
>>>> exactly on the diameter and the outer line of the circle. Therefore the
>>>> use antialiasing has the effect, that is seems that the circles are not
>>>> totally filled. You can see that in the middle line of the circles with
>>>> the former patch.
>>>> Because there is no way to decide on the values of the shading
>>>> parameters wether to use antialiasing or not, I changed my mind with
>>>> heavy heart not using antialiasing on radial shading pattern. At least
>>>> the wine glass is still looking better.
>>> I'm getting a out of memory error when rendering the second page of
>>> 9af89586e41a631f6b114a7f7bc5beaf  1und1_DSL_Flyer_partner.pdf
>>> i think you sent me this file, if you need it mail me and i'll send it
>>> back to you again.
>> No, I didn't send You this file, but You already sent me the link to it
>> because of bug 27208, so I have it.
>>
>>> The problem seems to be that when you calculate the scale in
>>> SplashRadialPattern constructor it ends up being infinite which in tourn
>>> tries to allocate a bitmap of infxinf in size which fails :D
>> Yes, You're true. Changing the order a little bit, calculating width&
>> height before rounding the bounding box, solves it:
>>
>>     width = xMax - xMin;
>>     height = yMax - yMin;
>>     xMin = splashRound(xMin);
>>     xMax = splashRound(xMax);
>>     yMin = splashRound(yMin);
>>     yMax = splashRound(yMax);
>>
>> BUT: pdftoppm crashes with page two in Splash::blitTransparent(), so not
>> in the new routines, but I want to solve that, too, before sending You a
>> complete new patch.
> FWIW pdftoppm (without your patch) does not crash here in that file.
Just to clearify: it is caused by a bad pointer, and this could cause 
segmentation faults, depends on the compiler and runtime environment. 
Debugging it with this PDF I found three bad pointers before it runs the 
first time in my new routines, and with the next bad pointer it crashes :-(

Thomas
> Albert
>
>> Thomas
>>
>>> Albert
>>>
>>>> Please try the new attached patch,
>>>> Thomas
>>>>
>>>>>> Thomas
>>>>>>
>>>>>> Am 27.12.2010 02:07, schrieb Albert Astals Cid:
>>>>>>> A Dilluns, 27 de desembre de 2010, Albert Astals Cid va escriure:
>>>>>>>> A Diumenge, 26 de desembre de 2010, Thomas Freitag va escriure:
>>>>>>>>> Am 04.11.2010 22:26, schrieb Albert Astals Cid:
>>>>>>>>>> Hi, i just commited the patch to splash with antialias and
>>>>>>>>>> shadings, really good work!
>>>>>>>>>>
>>>>>>>>>> Now, it seems you are both magicians so i'm asking another wish :D
>>>>>>>>>>
>>>>>>>>>> Of course only do this if you feel like it's fun ;-)
>>>>>>>>>>
>>>>>>>>>> Have a look at the ducks and roses at
>>>>>>>>>> http://www.acquerra.com.au/poppler/img_0.pdf
>>>>>>>>>>
>>>>>>>>>> Do you guys feel like trying to fix it?
>>>>>>>>>>
>>>>>>>>>> Albert
>>>>>>>>> Hi Albert!
>>>>>>>>>
>>>>>>>>> As I already mentioned, I had a deeper look at the ducks&     roses,
>>>>>>>>> and espially at the wine glass.
>>>>>>>>> I encountered, that there is no way to solve that in Gfx.cc, and
>>>>>>>>> therefore I implemented radial shading in SplashOutputDev now. It
>>>>>>>>> took me "some" days, more effort then I thought before beginning,
>>>>>>>>> but the result is really beautiful, therefore I attach not only the
>>>>>>>>> patch but the rendering result too, so that You can immediately
>>>>>>>>> what I mean with beautiful :-)
>>>>>>>>>
>>>>>>>>> Take it a belated xmas gift for the poppler community :-)
>>>>>>>> Good work :-)
>>>>>>>>
>>>>>>>> I've found a regression though, if you run pdftotext with and
>>>>>>>> without the pdf file i'll send you in private, you'll see that the
>>>>>>>> lower left square has some "random" white pixels that are not there
>>>>>>>> without the patch.
>>>>>>> s/pdftotext/pdftoppm :D
>>>>>>>
>>>>>>> Albert
>>>>>>>
>>>>>>>> Albert
>>>>>>>>
>>>>>>>>> Best regards,
>>>>>>>>> Thomas
>>>>>>>> _______________________________________________
>>>>>>>> poppler mailing list
>>>>>>>> poppler at lists.freedesktop.org
>>>>>>>> http://lists.freedesktop.org/mailman/listinfo/poppler
>>>>>>> _______________________________________________
>>>>>>> poppler mailing list
>>>>>>> poppler at lists.freedesktop.org
>>>>>>> http://lists.freedesktop.org/mailman/listinfo/poppler
>>>>>>>
>>>>>>> .
>>>>> _______________________________________________
>>>>> poppler mailing list
>>>>> poppler at lists.freedesktop.org
>>>>> http://lists.freedesktop.org/mailman/listinfo/poppler
>>>>>
>>>>> .
>>> _______________________________________________
>>> poppler mailing list
>>> poppler at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/poppler
>>>
>>> .
>> _______________________________________________
>> poppler mailing list
>> poppler at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/poppler
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler
>
> .
>




More information about the poppler mailing list