If a softmask is smaller a then the page bitmap, everything outside the softmask will be removed
Created attachment 34261 [details] [review] This should solve the problem If the splash page bitmap is initialized with 255 instead of 0, and then the softmask bitmap is drawn on it, it works
The patch causes regressions in lots of files, one of them is http://launchpadlibrarian.net/15866941/1und1_DSL_Flyer_partner.pdf
(In reply to comment #2) > The patch causes regressions in lots of files, one of them is > http://launchpadlibrarian.net/15866941/1und1_DSL_Flyer_partner.pdf > Nice, that You give a German sample, it's easier to read for me than a Spanish one :-) Seems as if the interesting switch wether to preset with 0 or 255 is AIS (alpha is shape). At least if I look at this parameter, this is one of the differents between Your pdf and my PDFs which causes the problem. So with a small change (but I need the gfx state, SplashOutputDev ignores that in the moment) it works at least with either my PDFs and the one You point to. I upload a new patch. Best regards, Thomas
Created attachment 34280 [details] [review] with interpreting alpha is shape
That second patch does not fix the pdf you sent in private
(In reply to comment #5) > That second patch does not fix the pdf you sent in private > Are You sure? I tested it with SPASH_CMYK and default (RGB), I attach my previews... Here the only interesting code as snippet: unsigned char fill = (state->getAlphaIsShape()) ? 255 : 0; memset(softMask->getDataPtr(), fill, softMask->getRowSize() * softMask->getHeight()); I attach the result bitmaps...
Created attachment 34281 [details] RGB output
Created attachment 34282 [details] CMYK output
Yeah, i'm sure, i've added a printf state->getAlphaIsShape() and it is giving me 0 in your file Which branch/release are you using as base of the patch?
(In reply to comment #9) > Yeah, i'm sure, i've added a printf state->getAlphaIsShape() and it is giving > me 0 in your file > Which branch/release are you using as base of the patch? > I checked it out with git clone on 17th of march, 13:57 CET, and compiled it with defines WIN32;_DEBUG;_WINDOWS;SPLASH_CMYK;USE_FREETYPE2_STATIC;_CRT_SECURE_NO_WARNINGS;ENABLE_LIBPNG;WITH_FONTCONFIGURATION_WIN32;OPI_SUPPORT Confused, Thomas
(In reply to comment #9) > Yeah, i'm sure, i've added a printf state->getAlphaIsShape() and it is giving > me 0 in your file > Which branch/release are you using as base of the patch? > Oh, I forgot: I made an additional change in Gfx.cc, because I had sometimes problems with inline images compresses as jpeg binary. So I add this change from my old version to the actual but hadn't tested it in general, therefore I omit it in my path, but to be sure (even if I don't believe that this cause the problem), I'll add a complete diff. Thomas
Created attachment 34286 [details] complete patch with changed inline skip
(In reply to comment #9) > Yeah, i'm sure, i've added a printf state->getAlphaIsShape() and it is giving > me 0 in your file > Which branch/release are you using as base of the patch? > Wait, it seems to be a compiler problem: printf("fill: %d because of AlphaIsShape: %d(%d)\n", fill, (int) state->getAlphaIsShape() == gTrue, state->getAlphaIsShape()); results in: fill: 255 because of AlphaIsShape: 0(-842150451) I have another look at it! Thomas
(In reply to comment #3) > (In reply to comment #2) > > The patch causes regressions in lots of files, one of them is > > http://launchpadlibrarian.net/15866941/1und1_DSL_Flyer_partner.pdf > > > > Nice, that You give a German sample, it's easier to read for me than a Spanish > one :-) > Seems as if the interesting switch wether to preset with 0 or 255 is AIS (alpha > is shape). At least if I look at this parameter, this is one of the differents > between Your pdf and my PDFs which causes the problem. So with a small change > (but I need the gfx state, SplashOutputDev ignores that in the moment) it works > at least with either my PDFs and the one You point to. I upload a new patch. > > Best regards, > Thomas > Forget the nonsense with AIS, I went completely in the wrong direction. The filling with a value other then 0 in some cases was a good idea, but to find the correct cases.... After debugging instead of looking into Your PDF directly I think I found the solution now: We have to initialize the grayscale softmask with the grascale value of the backdrop color, at least if blending ColorSpace is available (otherwise I default to zero). Patch follows immediately. Sorry again for the inconvenience, Thomas
Created attachment 34301 [details] [review] next try
I've commited the fix, thanks for the patch. If anyone ever needs the file mail me since i have it.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.