将ColorWash应用于PNG图像 [英] Applying a ColorWash to a PNG Image

查看:55
本文介绍了将ColorWash应用于PNG图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨加文:

感谢您的彩色文章和免费代码.对于jpeg图像,它们效果很好.

如果我们将png图像的名称更改为Gav.jpeg,则可以进行彩色冲洗(是!),但是在彩色背景上,拐角处显示为白色(呃,哦).

如果我们将jpeg和jpg的所有引用都更改为png,则它不起作用.

我只有Visual Web Developer,所以我看不到/更改您箱中的内容:ColorWashExample.dll和GavDev.Image.dll.

如何将Colorwash用于.png图像?

我已经为此工作了好几天-非常感谢您的帮助.

问候
Monica

Hi Gavin:

Thanks for your colorwash article and free code. They work great..for jpeg images.

If we change the name of a png-image to Gav.jpeg, the colorwash works (yea!), but the corners show white on a colored backgound (uh-oh).

If we change all references of jpeg and jpg to png, it doesn''t work.

I only have Visual Web Developer, so I can''t see/change what''s in your bin: ColorWashExample.dll, and GavDev.Image.dll.

How do I use Colorwash for .png images?

I''ve been working on this for days - I''d really appreciate your help.

Regards
Monica

推荐答案

写道:​​

i加文:

感谢您的彩色文章和免费代码

i Gavin:

Thanks for your colorwash article and free code



每个文章下方都有一个论坛,可用于向文章作者发送消息.



There''s a forum underneath each article which can be used to send messages to article authors.

写道:​​

但是jpeg不适用于圆角.

But jpeg is not good for rounded corners.



JPEG有损.



JPEG is lossy.

写道:​​

如果我们将其中一个的名称更改为Gav.jpeg,则颜色冲洗有效(是!),但是角落在彩色处显示为白色背景(uh-oh).

If we change the name of one to Gav.jpeg, the colorwash works (yea!), but the corners show white on a colored backgound (uh-oh).



PNG支持透明区域,转换为JPG会丢失这些区域.




PNG supports transparent areas, converting to JPG will lose those.


写道:​​

如果我们将jpeg和jpg的所有引用都更改为png,则它将无效.

If we change all references of jpeg and jpg to png, it doesn''t work.



重命名文件以表示文件不是很疯狂.重命名文件不会使它成为jpg,也不会使该程序处理能够使用该jpg的jpg.



Renaming a file to represent something it is not, is insane. Renaming a file does not make it a jpg, or make a program that deals with jpgs able to use it.

写道:​​

我已经为此工作了好几天-非常感谢您的帮助.

I''ve been working on this for days - I''d really appreciate your help.



在我看来这有点疯狂.我没有读过这篇文章,但是我要进行彩色清洗的方法是只在透明的图像上绘制图像,以使图像显示透彻.这将着色整个图像.如果您想要更好的控制,可以编写一些在像素上迭代并添加颜色的图像处理代码.



This seems a little insane to me. I''ve not read the article, but the way I''d do a color wash is to just draw over the image with transparency so that the image shows through. This will tint the entire image. If you want greater control, you could write some image processing code that iterates over the pixels and adds color.




这又是莫妮卡.我前一阵子解决了.

图像周围有白色区域的原因是因为Gavin处理了图像的克隆,并在其周围放置了一个矩形.我需要做的就是使用原始版本而不是克隆版本,以及将jpg/jpeg引用更改为png.

(顺便说一句,克里斯汀,这个过程确实遍历每个像素,而jpg/jpeg引用是关于编码路径的,就像在VB子目录中一样:
公共共享的子ColorWashImage(ByVal FilePathOriginal作为字符串,...等...可选ByVal编码为String ="image/png")...等...
编码最初显示为="image/jpeg".)

不过,我不记得如何将dll放入App_Code中,因为必须在Manipulate.vb中进行更改.

希望这会有所帮助.
莫妮卡
Hi,

This is Monica again. I solved this a while ago.

The reason there is a white area around the image is because Gavin worked with a clone of the image, putting a rectangle around it. All I needed to do is work with the original instead of the clone, as well as change the jpg/jpeg references to png.

(By the way, Christian,this process does iterate through each pixel and the jpg/jpeg references were with regard to the encoding path as in a VB sub:
Public Shared Sub ColorWashImage(ByVal FilePathOriginal As String, ...etc...Optional ByVal Encoding As String = "image/png")...etc...
The encoding originally says ="image/jpeg".)

I don''t remember, though, how I got the dll into the App_Code, because the changes have to be made in Manipulate.vb.

Hope this helps.
Monica


这篇关于将ColorWash应用于PNG图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆