Jump to content

Transparent PNG and GDI+


aspnetguy
 Share

Recommended Posts

I have a form that uploads images and resizes them if they exceed the maximum size. Everything works great except when uploading transparent PNG images. They lose transparency and the background turns a grayish color.Any ideas on how to stop this?

Link to comment
Share on other sites

I know in Cold Fusion this would be directly related to the server side custom tag that I would be calling to do the resizing - my code would not be able to do anythinng about it.In ASP or .NET, are you calling functions from within a standard DLL? Or are you installing an "after market" DLL to perform the task?

Link to comment
Share on other sites

I am using the System.Drawing class that is built into .Net.

I wonder if it is just a limitation in that class then. Have you researched any aftermarket .NET classes that may offer more functionality and even perhaps address the transparency issue. I can't see how you are doing anything wrong as I understand that the transparency characteristic is something that is specially treated by the appropriate software and can easily be dropped if a transparent image is opened and saved in a program that doesn't support that capability.
Link to comment
Share on other sites

ok, I discovered the problem...it is not ASP.Net at all...it is IE5.5 & 6 (go figure).They do not fully support transparent PNG. The PNGs show up fine in FF. So once again I am cursing IE...I must find a CSS hack to fix this. I'll post the hack when I find it.Alos I have read that PNG Tranparency is a promise of IE7...way over due if you ask me (along with lots of other things...like WEB STANDARDS COMPLIENCE :)).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...