简体   繁体   English

我们可以使用 Photoshop/GIMP 在九块 (9.png) 图像中创建黑线吗?

[英]Can we use Photoshop/GIMP to create black lines in nine-patch (9.png) images?

Android SDK tool draw9patch is soooo slow when I have to create a nine-patch from a full image (image for backgrounds) because it does not allow quick drawing of black line from top to bottom (like we are used in Photoshop or Gimp), but I have to paint each pixel. Android SDK 工具 draw9patch 当我必须从完整图像(背景图像)创建九个补丁时非常慢,因为它不允许从上到下快速绘制黑线(就像我们在 Photoshop 或 Gimp 中使用的那样),但我必须绘制每个像素。 So waste of time.所以浪费时间。 I think you know what I am talking about.我想你知道我在说什么。

So, has anyone tried to draw black lines in Photoshop/GIMP taking care that you do not fill the end pixels?那么,有没有人尝试在 Photoshop/GIMP 中绘制黑线,注意不要填充末端像素? Will Android SDK treat them as a regular 9 PNG images? Android SDK 会将它们视为普通的 9 张 PNG 图像吗?

9.png is just.png - You can use any of you favorite tool just 1px border must be transparent or filled with black and extension must be set to.9.png 9.png is just.png - 您可以使用任何您喜欢的工具,只需 1px 边框必须透明或填充黑色,扩展名必须设置为 .9.png

There's this web tool - Simple Nine-patch Generator - which I find quite handy:有这个 web 工具 - 简单的九补丁生成器 - 我觉得很方便:

http://android-ui-utils.googlecode.com/hg/asset-studio/dist/nine-patches.html http://android-ui-utils.googlecode.com/hg/asset-studio/dist/nine-patches.html

I use Better9patch tool then I test them SDK's 9patch tool.我使用 Better9patch 工具然后我测试他们 SDK 的 9patch 工具。 But if you create 9patch with 1px border you should retouch them with PS or etc.. tools但是如果你用 1px 边框创建 9patch,你应该用 PS 或其他工具修饰它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM