May I ask you a question? I tried this: PdfDictionary res = (PdfDictionary)PdfReader.GetPdfObject(dict.Get(PdfName.RESOURCES)); PdfDictionary xobj = (PdfDictionary)PdfReader.GetPdfObject(res.Get(PdfName.XOBJECT));
if (xobj != null) { foreach (PdfName name in xobj.Keys) { PdfObject obj = xobj.Get(name); if ((obj.IsIndirect())) { PdfDictionary tg = (PdfDictionary)PdfReader.GetPdfObject(obj); PdfName subtype = (PdfName)PdfReader.GetPdfObject(tg.Get(PdfName.SUBTYPE)); if(PdfName.IMAGEMASK.Equals(subtype)) { // breakpoint here } ... I just wanted to check if masks were really present in my pdfs, but execution never came there. Can it be that not masks were my problem? Thank you very much, Dmitriy -----Original Message----- From: 1T3XT BVBA [mailto:i...@1t3xt.info] Sent: Monday, December 13, 2010 12:04 PM To: itext-questions@lists.sourceforge.net Subject: Re: [iText-questions] Images extract problem Op 13/12/2010 17:41, Dmitriy Reznik schreef: > I just know that the code that I found on internet is supposed to > extract all images, You never should use code "found on internet" if you're not sure what that code does. > but most of the images it extracts look like > negatives, plus brightness is higher than in pdf, and contrast is lower. > I don't even know if it is really masking, because in this case where is > the second image of each pair? Read the PDF Reference, use that knowledge to inspect the dictionary of the Image XObject. You'll find out that image A refers to image B as its /SMask. You need software that is able to create a new image that combines image A and its mask. Note that this combined image can't be a JPEG, because JPEG doesn't support transparency. > Is it realistic for me to get the right result, knowing that I have > never done anything like that, and probably will never do again? That is something that entirely depends on you. If you know what I meant with "dictionary", "Image XObject" and "SMask", you have a good chance at success. If not, I suggest that you hire somebody instead of doing the job yourself. ------------------------------------------------------------------------ ------ Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php ------------------------------------------------------------------------------ Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php