In general I've been quite successful in extracting images by navigating the
iText data-structure, identifying the encoding and applying the appropriate
decoder to the PdfStream.

I have a slightly more complex situation where it appears the images are in
a PDF form encoded with FLATEDECODE 

So I decode the FLATEDECODE data and end up with the following:

/GS5 gs
q
0 0 1 1 re
W n
/GS4 gs
0 J 0 j 4 M []0 d 0.0284 w 
0 0 0 0.7 K
0.9539 0.5332 m
0.9891 0.5332 l
0.9891 0.5896 l
0.9697 0.6397 l
0.4126 0.6397 l
0.4126 0.337 l
0.9697 0.337 l
0.9912 0.3718 l
0.9912 0.4193 l
0.6447 0.4193 l
0.6792 0.5332 l
0.7494 0.5332 l
0.7494 0.4957 l
0.7814 0.4957 l
0.7814 0.545 l
0.8219 0.545 l
0.8219 0.4994 l
0.8557 0.4994 l
0.8557 0.5488 l
0.8982 0.5488 l
0.8982 0.4945 l
0.9315 0.4945 l
0.931 0.5327 l
s
0.7 0 0 0.45 k
0.0118 0.1781 m
0.0757 0.0868 0.1632 0.0305 0.2595 0.0305 c
0.356 0.0305 0.4433 0.0868 0.5073 0.1779 c
0.5073 0.8219 l
0.4433 0.9132 0.3559 0.9695 0.2595 0.9695 c
0.1631 0.9695 0.0757 0.9132 0.0118 0.822 c
0.0118 0.1842 l
f
0.0379 w 
0 0 0 1 K
0.0118 0.1781 m
0.0757 0.0868 0.1632 0.0305 0.2595 0.0305 c
0.356 0.0305 0.4433 0.0868 0.5073 0.1779 c
0.5073 0.8219 l
0.4433 0.9132 0.3559 0.9695 0.2595 0.9695 c
0.1631 0.9695 0.0757 0.9132 0.0118 0.822 c
0.0118 0.1842 l
s
0 0 0 0.7 K
0.9776 0.5242 m
0.9776 0.4343 l
S
0 0 0 1 k
0.3677 0.5177 m
0.3677 0.3633 0.3193 0.2382 0.2597 0.2382 c
0.2001 0.2382 0.1517 0.3633 0.1517 0.5177 c
0.1517 0.672 0.2001 0.7972 0.2597 0.7972 c
0.3193 0.7972 0.3677 0.672 0.3677 0.5177 c
f
0.0265 w 
0 0 0 0 K
0.3677 0.5177 m
0.3677 0.3633 0.3193 0.2382 0.2597 0.2382 c
0.2001 0.2382 0.1517 0.3633 0.1517 0.5177 c
0.1517 0.672 0.2001 0.7972 0.2597 0.7972 c
0.3193 0.7972 0.3677 0.672 0.3677 0.5177 c
s
0 0 0 0 k
0.2107 0.4173 m
0.2107 0.5479 l
0.3071 0.5479 l
0.3071 0.4173 l
0.3071 0.4152 l
0.3071 0.355 0.2855 0.3061 0.2589 0.3061 c
0.2323 0.3061 0.2107 0.355 0.2107 0.4152 c
f
0.231 0.5074 m
0.231 0.6125 l
0.231 0.6569 0.2449 0.693 0.2621 0.693 c
0.2793 0.693 0.2932 0.6569 0.2932 0.6125 c
0.3054 0.6125 l
0.3054 0.6743 0.286 0.7244 0.2621 0.7244 c
0.2382 0.7244 0.2188 0.6743 0.2188 0.6125 c
0.2188 0.5074 l
f
0 0 0 1 k
0.2733 0.4696 m
0.2733 0.4487 0.2667 0.4319 0.2587 0.4319 c
0.2506 0.4319 0.2441 0.4487 0.2441 0.4696 c
0.2441 0.4905 0.2506 0.5074 0.2587 0.5074 c
0.2667 0.5074 0.2733 0.4905 0.2733 0.4696 c
f
0.2695 0.3512 m
0.2478 0.3512 l
0.2516 0.4706 l
0.2664 0.4706 l
f
Q


1. Exactly what format is the above, is it raw ghost-script because I can't
seem to read it with anything (gsview,acrobat etc)?

2. If it is an EPS (maybe it's something else?) what do I need to do to turn
this into and viewable image?


I know this question is not exactly relating to iText but I was hoping
someone here might have the knowledge to point me in the right direction,
thanks.

-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Decoding-Images-tp3042906p3042906.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
iText-questions mailing list
[email protected]
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

Reply via email to