• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

same image extraction problem

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

i tried all the possibilities to extract image from a word doc...but i failed to do so...

any suggestions from u people will be greatly appreciated.

Ashish
 
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What have you done so far? I'd take a look at the Apache POI project for Java classes that are partially capable of reading M$/Office files.
 
Ashish Vegaraju
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

i have used the POI project and i can read text, styles,table data.. etc from a word file...but i cant extract embedded images from those files.

i have studied the jpg file format and i know that the starting image address is "0xd8" but in Word file the image is hidden somewhere....i cant locate that header address...infact i tried a small code for header comaprision....but there r many "0xd8"(s) in a word file...i m totally confused, if u know any other way to solve the problem then kindly give me some suggestions.

right now POI dont support image extraction from Word files.

Ashish.
 
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The JFIF/JPG should start with:

0xffd8 (not just 0xd8!)

and end with:

0xffd9

HTH, Guy
 
Ashish Vegaraju
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

the problem is not the start address...the problem is the way i m approaching the problem and i know this is a wrong way...even if i successfully find 0xffd8 as the start address of image in a M$ Word file...its not guarenteed that i'll find all the image data serially...or in a sequence...u can say this is the art of Microsoft, to complicate even the 2+2 calculation.

Ashish.
reply
    Bookmark Topic Watch Topic
  • New Topic