PowerPoint 2010 加载项导出到图像问题

发布于 2024-11-09 22:35:57 字数 328 浏览 2 评论 0原文

我目前正在完成有关支持 2007 和 2010 的 PowerPoint 插件的一些工作。简单的要求是将所有 PowerPoint 幻灯片导出为图像,然后将它们包装为专有格式。

总体而言,一切都工作得很好,除了我在从 PowerPoint 2010 导出时注意到一个问题。我在右侧 (4px) 和底部 (3px) 看到一个小的透明边框。我不能 100% 确定图像是否偏移或只是倾斜,但我猜测它实际上是偏移的(-4px,-3px)。

我在互联网上搜索了解决方案,但没有找到与我的问题有关的任何信息。

我的问题是:这里有人亲眼目睹过这个问题吗?如果是的话你能解决吗?

谢谢, 麦克风

I am currently finalizing some work on a PowerPoint add-in that is to support both 2007 and 2010. The simple requirement is to export all PowerPoint slides to images and then wrap them in a proprietary format.

Everything is working wonderful overall except that I have noticed one issue when exporting from PowerPoint 2010. I am getting a small transparent border on the right (4px) and bottom (3px). I am not 100% sure if the image is offset or just skewed, but I am guessing it is actually offset (-4px,-3px).

I have searched the internet for a resolution but have not found much of anything in regards to my issue.

My question is: Has anyone here witnessed this issue themselves? If so were you able to resolve it?

Thanks,
Mike

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

万劫不复 2024-11-16 22:35:57

您以什么分辨率导出?
IIRC,当您以 PPT 允许的最大像素(3072 像素)导出图像时,有时会遇到这种情况。如果您要导出接近该值的任何位置,请尝试将输出分辨率降低到 3000 像素。

What resolution are you exporting at?
IIRC, you sometimes get this when you export images right at the max PPT permits, 3072 pixels. If you're exporting anywhere near that, try reducing the output resolution to, say, 3000 pix.

浮光之海 2024-11-16 22:35:57

我通过以下步骤解决了此问题:

  1. 检测 PowerPoint 的版本。
  2. 如果是 2010 年,则我导出宽 4 像素、高 3 像素 (1028 x 771)。
  3. 将生成的图像文件裁剪为所需的 1024 x 768。

我不知道是否有更优雅的方式来解决这个问题,但这对我来说已经成功了。

I resolved this issue through the following steps:

  1. Detecting the version of PowerPoint.
  2. If 2010 then I export 4 pixels wider and 3 pixels taller (1028 x 771).
  3. Crop the resulting image file to the desired 1024 x 768.

I don't know if there is a more elegant manner to resolve this, but this has done the trick for me.

木緿 2024-11-16 22:35:57

PowerPoint 大小不是标准(屏幕)像素。例如,如果要保存宽度和高度分别为 300x300 像素的图像,则必须提供宽度和高度 300/1.333333,其中 1.33333 是无理重复数。因此,尺寸可能会被不恰当地舍入。您应该将宽度/高度设置为浮点数,并提供尽可能多的小数位以实现所需的结果。不要使用整数。然后让 PowerPoint 计算出差异。这应该可以让您在导出时获得正确的尺寸。

PowerPoint sizes are not in standard (screen) pixels. For example, if you want to save an image with a width and height of 300x300 pixels (respectively), then you must provide a width and height of 300/1.333333, where 1.33333 is an irrational, repeating number. For this reason, sizes can be inappropriately rounded. You should set your width/height as a float, providing as many decimal places as is necessary to achieve the desired result. Do not use an integer. Then let PowerPoint work out the difference. This should get you to the proper dimensions on export.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文