如何使用actionscript在Photoshop中生成图形?

发布于 2024-08-29 13:26:44 字数 486 浏览 5 评论 0原文

我有一个包含如下内容的文本文件:

id, pixelsize, color, text
block1, 200x60, black, Header
block2, 200x180, white, Body
block2, 200x60, black, Footer

现在使用actionscript,

  1. 我想生成一个psd文件,该文件将生成3个垂直块图形(像这样)解析给定文件后。所有块都垂直放置在彼此的顶部。

  2. 使用脚本自动将此 psd 文件转换为 PDF。

  3. 自动化整个过程,无需打开 Photoshop。这可能吗?

请帮忙。谢谢。

I've a text file with content like this:

id, pixelsize, color, text
block1, 200x60, black, Header
block2, 200x180, white, Body
block2, 200x60, black, Footer

Now using actionscript,

  1. I want to generate a psd file which would generate a 3 vertical block graphics (like this) after parsing the given file. All the blocks are placed vertically on top of each other.

  2. Convert this psd file into PDF automatically using the script.

  3. Automate this whole process without opening photoshop. Is it possible?

Please help. Thanks.

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

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

发布评论

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

评论(3

南街九尾狐 2024-09-05 13:26:44

如果不打开 Photoshop,您将无法创建 PSD。即使您使用 Adob​​e Bridge 之类的工具来批处理来自任何 Adob​​e 应用程序的文件,它仍然使用适当的应用程序来打开受支持的文件并对其执行操作。

我见过一些应用程序允许您从用户定义的文本和可变图像输出 PDF(我想到了 PageFlex)...但即便如此,保存 Adob​​e 兼容文件也不是关闭和打开的简单任务(就像当您一个文本文件)。即使使用 PDF,也需要管理大量数据,而当您查看 PSD 文件时,我怀疑更多数据。

除非你能找到一个开源应用程序,以某种方式允许你扰乱其编码,以便你可以绕过 100% 打开它来输出某种程度上兼容的 PSD/PDF 文件,否则我认为你无法自动化不需要大量工作和一些可能昂贵的软件解决方案。

长答案短,我认为你必须在解决方案中的某个时刻使用 Photoshop。从好的方面来说,您可以在 PS 中记录操作,以便可以将单个文件输出为您喜欢的任何格式……而且我确信这些文件可以编写成复杂的解决方案。

You aren't going to be able to create a PSD w/o opening Photoshop. Even when you use something like Adobe Bridge to batch process files from any Adobe app it still uses the appropriate app to open a supported file and perform actions on it.

I have seen apps that allow you to output PDFs from user defined text and variable images (PageFlex comes to mind)...but even then, saving Adobe-compatible files aren't simple tasks to turn off and on (like when you make a text file). There's a lot of data to manage even with PDFs and I'd suspect even more when you look at a PSD file.

Unless you can find an open-source app that somehow allows you mess with its coding so that you can bypass opening it 100% to output a somewhat compatible PSD/PDF file, I don't think you're going to be able to automate much w/o lots of work and some potentially expensive software solutions.

Long answer short, I think you'll have to use Photoshop at some point in your solution. On the upside, you could make a recording of actions in PS so that individual files can be output to whatever format you like...and those I'm sure can be scripted into complicated solutions.

清醇 2024-09-05 13:26:44

您可以使用 ExtendScript Toolkit< /a> 来自 Adob​​e。

不过,不确定是否可以在不打开 Photoshop 的情况下完成此操作。

You can do this kind of thing using the ExtendScript Toolkit from Adobe.

Not sure you can do it without having Photoshop open, however.

清风挽心 2024-09-05 13:26:44

鉴于您最后想要一个 PDF,您可以使用类似 AlivePDF (ActionScript 3 开源 PDF图书馆)?

如果您实际上还需要生成 PSD,我不确定您如何从头开始执行此操作,但是 Photoshop SDK 将是一个很好的起点,并且可以很好地理解 字节数组

Given that you want a PDF at the end, could you use something like AlivePDF (ActionScript 3 Open-Source PDF Library)?

If you actually need to also generate a PSD, I'm not sure how you do that from scratch, but the Photoshop SDK would be a good place to start, as well as getting a good understanding of bytearrays.

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