将方形图像变成带有光泽的圆形矩形按钮 [目标 C]
在这张图片中,您将看到几个电视节目图像已放入圆角矩形按钮中,其光泽/光泽与 iPhone 应用程序按钮通常具有的光泽/光泽相同。
替代文本 http://a.imageshack.us/img16/3020/tvforecast.png< /a>
在其中一个图标中,您甚至可以看到一条丝带,上面写着“正在播出”。
我想知道;如何复制这种效果?
我的猜测是程序员在方形图像的顶部遮盖了一个图像。
我知道 这个答案涵盖将方形图像变成圆形图像。
然而,如何增加光泽?你会如何添加丝带?
在内存管理方面,创建一个具有图像+光泽+色带内容的新图像是否更好?
In this picture you will see several TV show images that have been put into a rounded rect button with the same gloss/shine that an iphone app button usually has.
alt text http://a.imageshack.us/img16/3020/tvforecast.png
In one of the icons you even see a ribbon saying "On air".
I'm wondering; how do you replicate this effect?
My guess is the programmer masked an image on top of the square image.
I'm aware that this answer covers turning square images into rounded ones.
However, how do you add the shine; and how would you add the ribbon?
In terms of memory management, is it better to create a new image that has the contents of an image + gloss + ribbon?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你需要敷面膜。这篇博文有一个 PNG 或 PSD,您可以对其进行改编
http://surgeworksmobile.com/iphone/iphone-icons-how-to-preview-the-glossy-effect
您可以使用 ImageMagick 应用蒙版。
http://www.imagemagick.org/Usage/channels/#masking
如果如果您需要在手机上执行此操作,则必须链接到 ImageMagick 的静态库版本,或者尝试找出如何使用 CoreImage 屏蔽它。
You need to apply a mask. This blog post has a PNG or PSD that you could adapt
http://surgeworksmobile.com/iphone/iphone-icons-how-to-preview-the-glossy-effect
You could apply the mask with ImageMagick.
http://www.imagemagick.org/Usage/channels/#masking
If you need to do it on the phone, you'd have to link to a static lib version of ImageMagick or try to figure out how to mask it with CoreImage.