views:

193

answers:

5

Hi

I have tried uploading a transparent PNG image to a SQL server image field, and retrieving it using the DynamicData ImageHandler. The Transparent areas in the image appear white upon rendering. Please advise about any solutions

A: 

Use a BLOB directly and put the image's raw data into that.

JeeBee
+1  A: 

It could be a browser issue, IE6 has a terrible problem with rendering transparent pngs. Does the same problem occur in Firefox?

Tom
A: 

I agree with Tom, I could hardly believe that SQL would change the image, giving the problems you are experiencing. Furthermore, why storing the images in a SQL server image field? You should have a real good reason for doing so, because otherwise it's better (in my experience) to store a reference to the file in a varchar field.

gijswijs
A: 

I'm not 100% sure but I suspect that ImageHandler is manipulating your image in a way that causes the transparency to disappear.

Workshop Alex
A: 

The problem was the content type of the returned response from the handler. After setting the content type to image/png, it worked

Midhat