在 PlantUML 盐线框中引用本地图像
我正在尝试将本地图像包含到我的 PlantUML salt 线框中,以用于 Ubuntu 20.04 中的 GUI 文档。 PlantUMl 参考页面仅显示如何包含 http 链接。如何做到这一点?
我尝试了以下操作,但输出中出现“无法解码”。
@startsalt
scale 2
{
title Test Page
{S
{^"Figure"
<img:file://./pie-chart.png>
<img:file://./pie-chart.png>
<img:.\pie-chart.png>
}
..
}
}
@endsalt
I'm trying to include a local image into my PlantUML salt wireframe for my GUI documentation in Ubuntu 20.04. The PlantUMl reference page only shows how to include a http link. How to do this?
I tried the following, but I'm getting "Cannot decode" in the output.
@startsalt
scale 2
{
title Test Page
{S
{^"Figure"
<img:file://./pie-chart.png>
<img:file://./pie-chart.png>
<img:.\pie-chart.png>
}
..
}
}
@endsalt
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果将图像
blah.png
存储在与Plantuml源同一位置的位置,这将有效:我在(Windows)机器上:
net/lx5on.png“ rel =” nofollow noreferrer“>
我的Windows机器上有WSL,因此我在Ubuntu启动了Vscode,并为VSCODE安装了Plantuml插件。我创建了一个文件
/home/me/test/blah.png
(从我的Windows复制),然后创建以下存储在/home/me/me/test.wsd :
它具有相对和绝对路径,带有用于指定图像的
src =
替代方案。我可以让它们全部与我的Ubuntu 20上的PNG文件一起使用(再次使用vScode的Plantuml扩展程序)。我应该声明我将其配置为使用Plantuml Server。如果您使用较旧版本的Plantuml(Ubuntu的Apt会可悲地带来一个古老的版本)。If you store the image
blah.png
at the same location as the PlantUML source, this will work:I get on my (windows) machine:
Edit: WSL (Ubuntu) test
I have WSL on my Windows machine, and so I started up VSCode in Ubuntu, and installed the PlantUML plugin for VSCode. I created a file
/home/me/test/blah.png
(copied from my Windows), and then created the following PlantUML file stored in/home/me/test.wsd
:It has relative and absolute paths, with the
src=
alternative for specifying images. I can get them all to work with png files on my Ubuntu 20 (again, using the PlantUML extension for VSCode). I should state that I have it configured to use the PlantUML server. If you're using an older version of PlantUML (Ubuntu's apt will sadly bring over an ancient one).