I have an asp.net website and am exporting an image from the Report Viewer. I have created my byte array to get the data from the report viewer and now I need to save an image with transparency to the client machine using the response headers. I was able
to do this by saving the array to the server as a bmp and then adding transparency and saving to the client as a GIF; however, the requirement has changed and now I need to do this without saving the file to the server and even though I have found several
solutions using unsafe code these will not work for us because we are not allowed to use unsafe code in our environment.
So in short I need a way to go from an array of bytes to a transparent gif and save to the client machine without using unsafe code and without saving a file to the server.
mattheweston
Member
3 Points
20 Posts
Save byte array to Image with transparent background to client machine
Nov 05, 2010 01:20 PM|LINK
I have an asp.net website and am exporting an image from the Report Viewer. I have created my byte array to get the data from the report viewer and now I need to save an image with transparency to the client machine using the response headers. I was able to do this by saving the array to the server as a bmp and then adding transparency and saving to the client as a GIF; however, the requirement has changed and now I need to do this without saving the file to the server and even though I have found several solutions using unsafe code these will not work for us because we are not allowed to use unsafe code in our environment.
So in short I need a way to go from an array of bytes to a transparent gif and save to the client machine without using unsafe code and without saving a file to the server.
transparency gif byte array