OpenOffice Drawing API:从页面大小的图片创建幻灯片
我从一系列图像文件创建了一个 Impress 演示文稿。我可以创建一个 Page
并插入 GraphicObjectShape
,没有任何问题,但当我必须调整包含图像的形状的大小时,我遇到了困难。
我的问题是我不知道应该使用什么尺寸。当然,我可以进行反复试验,但这不会很专业,不是吗?
我的问题:我创建的新页面
的大小以像素为单位?如何访问图片上下文菜单中的“原始尺寸”功能?
在页面设置中,我看到尺寸为 11.02" x 8.27" - 当我创建新文档和新页面时,是否可以保证所有未来版本都将使用此尺寸?
了解图像文件的大小应该适合整个页面会很有趣。
I create an Impress presentation from a series of image files. I can create a Page
and insert the GraphicObjectShape
without any problem, but got stuck when I have to size the shape containing the image.
My problem is that I have no clue what sizes should I use. Of course I could go with a trial and error process, but it would not be very professional would it?
My questions: what is the size of the new Page
I create in pixels? How to access the function "Original Size" which can be found in the picture's context menu?
In the Page Setup I see a size of 11.02" x 8.27" - Is there any guarantee that all future versions will use this size when I create a new document and a new page within?
It would be interesting to know what size the image file should be to fit the whole page.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
光栅图像似乎以 96 DPI 分辨率加载。如果您使用 Impress 的默认页面尺寸 (11.02" x 8.27"),则完全适合的光栅图像尺寸(以像素为单位)为:
1058 x 794
另外,如果您坚持使用此尺寸(如它可能是最兼容的选择(例如,当您保存到 PPT 时),不要依赖这是默认值这一事实。创建文档后,您可以通过设置任何页面的
Width
和Height
属性来设置幻灯片的大小(似乎在调整某个页面的大小后,所有其他页面都会跟随)其中)。API 使用 100/mm 刻度。 11.02 英寸为 280 毫米,因此宽度为 280 * 100 = 28000,高度为 21000。
将演示文稿大小调整为 11.02" x 8.27" 并插入(最好是 4:3)图像以适合的 Java 示例整个页面:
It seems that raster images are loaded with a 96 DPI resolution. If you are using the default page size for Impress (11.02" x 8.27") then the fully fitting raster image size (in pixels) is:
1058 x 794
Also, if you stick with this size (as it is probably the most compatible choice for example when you are saving to PPT), do not rely on the fact that this is the default. After document is created you can set the size of the slides by setting the
Width
andHeight
property of any page (it seems that all other pages going to follow after you resize one of them).The API uses a 100/mm scale. 11.02 iches are 280 mm, so width is 280 * 100 = 28000, height is 21000.
Java example to resize the presentaion to 11.02" x 8.27" and insert (a preferably 4:3) image to fit the whole page: