You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by "Havard, Nick" <ni...@savvis.net> on 2007/03/30 15:09:15 UTC
HSLF - Adding Picture is 133% of actual size
Hi
I'm adding a picture to new slideshow and it always seems to be scaling
it to 133% of actual size. The picture is in the OutputStream os.
int i = ss.addPicture(os.toByteArray(),Picture.PNG);
Picture p = new Picture(i);
s = ss.createSlide();
s.setSlideNumber(ss.getSlides().length);
s.addShape(p);
I've tried using the setDefaultSize() method on Picture and the
setAnchor method of Picture to adjust sizing and positioning without
success.
Presumably I'm missing something very simple! Can someone point me in
the right direction to set the picture size to the actual picture size
(i.e. no scaling).
Nick Havard
RE: Re[2]: HSLF - Adding Picture is 133% of actual size
Posted by "Havard, Nick" <ni...@savvis.net>.
Hi Yegor,
I've compiled up a new version and generated the ppt.
Everything looks good.
Many thanks for the quick turnaround.
Nick.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
Re[2]: HSLF - Adding Picture is 133% of actual size
Posted by Yegor Kozlov <ye...@dinom.ru>.
I've just committed the fix.
Take the latest sources from svn and build.
Yegor
HN> Hi Yegor,
HN> Thanks for response. Do you have a bug number?
HN> I'd appreciate it if you could tag the thread once the fix is committed
HN> so I can build a new version of the jar's.
HN> Best Wishes.
HN> Nick Havard
HN> ---------------------------------------------------------------------
HN> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
HN> Mailing List: http://jakarta.apache.org/site/mail2.html#poi
HN> The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
RE: HSLF - Adding Picture is 133% of actual size
Posted by "Havard, Nick" <ni...@savvis.net>.
Hi Yegor,
Thanks for response. Do you have a bug number?
I'd appreciate it if you could tag the thread once the fix is committed
so I can build a new version of the jar's.
Best Wishes.
Nick Havard
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/
Re: HSLF - Adding Picture is 133% of actual size
Posted by Yegor Kozlov <ye...@dinom.ru>.
Hi,
It's a bug.
Before setting coordinates for a picture we need to convert from
pixels (96 dpi) to points (72 dpi). Missing this results in the 1.33
factor.
I will upload the fix today.
Thanks for the report.
Regards,
Yegor
HN> Hi
HN> I'm adding a picture to new slideshow and it always seems to be scaling
HN> it to 133% of actual size. The picture is in the OutputStream os.
HN> int i = ss.addPicture(os.toByteArray(),Picture.PNG);
HN> Picture p = new Picture(i);
HN> s = ss.createSlide();
HN> s.setSlideNumber(ss.getSlides().length);
HN> s.addShape(p);
HN> I've tried using the setDefaultSize() method on Picture and the
HN> setAnchor method of Picture to adjust sizing and positioning without
HN> success.
HN> Presumably I'm missing something very simple! Can someone point me in
HN> the right direction to set the picture size to the actual picture size
HN> (i.e. no scaling).
HN> Nick Havard
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/