Click here to Skip to main content
15,895,841 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Updated 23-Dec-09 8:41am
v3

wrote:
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.

wrote:
But jpeg is not good for rounded corners.


JPEG is lossy.

wrote:
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 supports transparent areas, converting to JPG will lose those.


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


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.

wrote:
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.
 
Share this answer
 
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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900