I know absolutly nothing about Powerpoint nor about the POI api that supports
it but I would have thought that once you have the image then you should use
the standrd Java API and I am confident that if you searched for code that
told you how to resize an image using Java then you should find some help.
Just did that myself and came across these links, one may help;

http://www.velocityreviews.com/forums/t126229-resize-image-jpg-problem.html
http://www.webmaster-talk.com/coding-forum/63227-image-resizing-in-java.html
http://www.componenthouse.com/article-20
http://www.rgagnon.com/javadetails/java-0243.html
http://www.digitalsanctuary.com/tech-blog/java/how-to-resize-uploaded-images-using-java.html

Yours

Mark B


[email protected] wrote:
> 
> Maybe someone can tell me is it possible to scale Slide image (draw
> method) to given dimensions (without quaity loose), because I am
> searching without result.
> Anyone knows that ?
> Regards
> 
> [email protected] pisze:
>> Hi, All!
>>
>> I am using POI to display slides from PPT as Images in swing.
>> And I have a problem with size of images I get from draw method of 
>> Slide class.
>> I would like to set size of received image as 1024x768 but I do not 
>> know how to do this (by default it has smaller dimensions).
>>
>>         *SlideShow ppt = new SlideShow(new HSLFSlideShow(new 
>> FileInputStream(file)));*
>>            //ppt.setPageSize(new Dimension (1024,768)); // extends 
>> size of slides but do not fit content
>>
>>            Dimension pgsize = ppt.getPageSize();
>>            *Slide[] slide = ppt.getSlides();*      
>>            BufferedImage img = new BufferedImage(pgsize.width, 
>> pgsize.height, BufferedImage.TYPE_INT_RGB);
>>            Graphics2D graphics = img.createGraphics();
>>            graphics.setPaint(Color.white);
>>            graphics.fill(new Rectangle2D.Float(0, 0, pgsize.width, 
>> pgsize.height));
>>            *slide[0].draw(graphics);*
>>                       ImageIcon icn = new ImageIcon(img);
>>
>> Is it possible to draw images in given dimensions?
>> If yes, how to do it ?
>>
>> Best Regards
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/HSLFSlideShow-and-Slide-dimension-problem-tp27640306p27684353.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