Do not waste any time on this idea Matthew. I tried it out quickly and it did
not work at all. Sorry.

matthewxb wrote:
> 
> I have a workbook contains two pictures. I want to copy the pictures from
> a source workbook to a target workbook. How can I do that?
> 
> I used HSSFWorkbook.getAllPictures() to retrieve all the pictures, but it
> only allow me to read the pictures' binary data. I have to know the size
> and the location of each picture.
> I write a loop to read each worksheet and call
> HSSFSheet.getDrawingPatriarch(). It contains four methods in
> HSSFPatriarch, suppose they represent the location of picture.
>       
>       HSSFPatriarch.getX1(),HSSFPatriarch.getX2(), HSSFPatriarch.getY1(),
> HSSFPatriarch.getY2()
>       
> But above methods return 0, which is incorrect.
> 
> And the size of picture I couldn't find a way to know, since the actual
> picture size and the size shown in worksheet are different.
> 
> I want to copy the pictures from a source workbook to a target workbook.
> How can I do that? Please advice, thank you very much!
> 

-- 
View this message in context: 
http://www.nabble.com/Copy-images-from-Workbook-to-Workbook-tp23032425p23078457.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to