voyent
Blurry text  XML
Forum Index -> ICEpdf General Go to Page: Previous  1, 2
Author Message
patrick.corless

Joined: 26/Oct/2004 00:00:00
Messages: 1982
Offline


The imagess are both JPEG's so no inherent transparency. If you look before the Do token in the content stream there may be a GS token that specified a resource. My guess is that the GS dictionary has a CA or ca entry that is < 1.0
[Email]
amsmota

Joined: 01/Nov/2010 05:48:28
Messages: 92
Offline


Hmm, taking into account I'm no PDF specialist, the stream I see associated with images are ones that appear to have the coded image and other like this, with a pair of _bg/_fg images:


Code:
38 0 obj^M
 <</Length 39 0 R >>^M
 stream^M
 0 0 0 rg^M
 0 0 0 RG^M
 q^M
 1 0 0 1 0 0 cm^M
 612 0 0 792 0 0 cm^M
 /image_bg1 Do^M
 Q^M
 q^M
 1 0 0 1 0 0 cm^M
 612 0 0 792 0 0 cm^M
 /image_fg1 Do^M
 Q^M
 
 ^M
 endstream^M


so no GS or CA. I'll try to search some more.

Thanks again for your time and patience.


patrick.corless

Joined: 26/Oct/2004 00:00:00
Messages: 1982
Offline


Missed on first review. The second image has a /Mask 6 0 R entry. If you take a look the the 6 0 obj it might shed some more light on the problem.

The mask in general is used to clip the image but unfortunately still doesn't explain the transparency.
[Email]
amsmota

Joined: 01/Nov/2010 05:48:28
Messages: 92
Offline


Yes, the 6 0 is

Code:
6 0 obj^M
 <<^M
 /BitsPerComponent 1 ^M
 /DecodeParms <<^M
 /Columns 2550 ^M
 /K -1 ^M
 >>^M
 ^M
 /Filter /CCITTFaxDecode ^M
 /Height 3300 ^M
 /ImageMask true ^M
 /Length 7 0 R ^M
 /Name /image_sel ^M
 /Subtype /Image ^M
 /Type /XObject ^M
 /Width 2550 ^M
 >>^M
 stream^M


the stream is what seems to be a coded image as well...

I can try to remove the mask to see what happens, but nevertheless since this appears OK in Acrobat, that won;t solve the problem but maybe it pinpoint it better.

Cheers.
amsmota

Joined: 01/Nov/2010 05:48:28
Messages: 92
Offline


Removing the masks only made the pages that were slightly blurred to become even more blurred...

I guess something is not right when ICEpdf applies this type of masks, for what I understand masks are used to clip but also to add tranparency?

If you point me to somewhere in the code I'll step thru it.

In the meantime I read the 1.7 specification parts about Masks and SoftMasks but understood little...

Cheers.
amsmota

Joined: 01/Nov/2010 05:48:28
Messages: 92
Offline


Stepping thru the code I reach Stream.applyExplicitMask, where I have

Code:
baseImage=
 BufferedImage@74a83c5d: type = 10 ColorModel: #pixelBits = 8 numComponents = 1 color space = java.awt.color.ICC_ColorSpace@51133980 transparency = 1 has alpha = false isAlphaPre = false ByteInterleavedRaster: width = 850 height = 1100 #numDataElements 1 dataOff[0] = 0
 
 maskImage=
 BufferedImage@2c170a23: type = 12 IndexColorModel: #pixelBits = 1 numComponents = 4 color space = java.awt.color.ICC_ColorSpace@2086321 transparency = 2 transIndex   = 0 has alpha = true isAlphaPre = false BytePackedRaster: width = 2550 height = 3300 #channels 1 xOff = 0 yOff = 0


Their sizes are completed different but from what I read from the spec that is OK.

baseWidth 850
baseHeight 1100
maskWidth 2550
maskHeight 3300

So it just resizes the mask and paint the base image white in some places... Looks OK to me, but I don't understand why it's blurred...

amsmota

Joined: 01/Nov/2010 05:48:28
Messages: 92
Offline


This is getting a mess... What I describe happens only for some pages, actually the "slightly" blurred ones. The real blurred ones don't go to applyExplicitMask...

I'll try again tomorrow.
 
Forum Index -> ICEpdf General Go to Page: Previous  1, 2
Go to:   
Powered by JForum 2.1.7ice © JForum Team