I didn't say random - I said raw - meaning it's just an array of the
"pixels" that make up the image.

For example, consider an RGB image, then it's an array consisting of the
color values as in [R G B R G B R G B .....].  A CMYK image, therefore is [C
M Y K C M Y K ...].  Remember there are 11 ways to represent color in PDF -
so you need to (potentially) handle all of those situations.  Also, the
number of bits per component is in the /BitsPerComponent key.


On 9/25/09 9:36 PM, "Davis Ford" <davisf...@zenoconsulting.biz> wrote:

> What is the format?  How do I decode it..?  Surely it isn't just
> random bytes -- it has to adhere to some standard/structure.  Is there
> an API in iText to decode it?
> 
> I'll go take a look at the spec.
> 
> On Thu, Sep 24, 2009 at 9:44 PM, Leonard Rosenthol <lrose...@adobe.com> wrote:
>> AH...
>> 
>> That's because it is _NOT_ a TIFF image!  It is a raw bunch of bits of image
>> data.  Consult the PDF Reference/ISO 32000-1 for details.
>> 
>> Leonard
>> 
>> 
>> On 9/25/09 8:33 AM, "Davis Ford" <davisf...@zenoconsulting.biz> wrote:
>> 
>>> BTW: I already have a 3rd party lib that can scan raster images for
>>> barcodes, so this is not a problem either.  I also have code that can
>>> properly scale/re-scale a TIFF image if it was a fax -> scan.
>>> 
>>> I was actually pleased to see that the type of image was
>>> "/CCITTFaxDecode" created by iText BarcodeDatamatrix, since I am
>>> already dealing with these TIFF images.  I've been getting these as
>>> Fax -> Scan as TIF already.
>>> 
>>> However, when I do this:
>>> 
>>> 
>>> byte[] rawBytes = PdfReader.getStreamBytesRaw((PRStream)obj);
>>> 
>>> 
>>> ...something is wrong with these bytes.  They are missing the first
>>> bytes that identify it as a TIFF image.
> 
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Check the site with examples before you ask questions:
> http://www.1t3xt.info/examples/
> You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

-- 
Leonard Rosenthol
PDF Standards Architect
Adobe Systems



------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to