Upload (and resize) transparent gifs RRS feed

  • Question

  • User587772407 posted
    Hi !
    I have writed an ASP.NET (C#) application where you can upload a image from your computer do the webserver. The file is stored on as a file and filename and other fields are stored in a database.
    If the picture is higher and/or wider then expected it is resized before saved on the server. A thumbnail is also created.

    That's the background story - now to the problem.

    It can not handle transparent gif-files! The background is black

    I have read different forums on the web and found out that this seems to be a problem.
    Can someone give me, either a solution, or a finally answer that it is impossible?

    Tuesday, August 16, 2005 5:22 AM

All replies

  • User-221448209 posted

    Could you use PNG files inplace of GIF? PNG will also support transparency.



    Tuesday, August 16, 2005 8:51 PM
  • User587772407 posted


    As far as I know all browsers do not support png 100% and that might be a problem.

    If you have a solutions for PNG i will check that out. I think that the problem is the same, whether it is GIF och PNG


    Wednesday, August 17, 2005 2:31 AM
  • User-1750044441 posted
    Whenever you save a transparent gif, you'll need to recreate the palette with the transparency.  It's actually quite annoying, I think I read somewhere that it would be addressed in the 2.0 Framework, but I'm not sure.

    Anyway, this article about dynamically generating rounded corners discusses how to save transparent gifs.

    Friday, August 19, 2005 12:03 PM