473,385 Members | 1,311 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Image Streaming

I have a silverlight application that is displaying images that are streamed from a server via an ASPX page. Previously this application was a Java applet. The page that streams the images used to set a mime type of gif. Since Silverlight doesn't handle gif's I switched it to png. This seems to work fine when being served from a Windows 7 development machine but when deployed to the Windows 2003 server I am receiving an error.

A generic error occurred in GDI+.

I am at a complete loss as to why this would happen. Any insight would be greatly appreciated. Here is the streamer code that is pretty straight forward. It is in the page load.

Expand|Select|Wrap|Line Numbers
  1.             int imageId = Convert.ToInt32(Request.QueryString["Id"]);
  2.             MemoryStream stream = new MemoryStream();
  3.             try
  4.             {
  5.                 TaskDataProvider controller = new TaskDataProvider(WebServicesUri, TicketIdentity.Current.Ticket);
  6.                 byte[] image = controller.GetTaskImage(imageId);
  7.                 stream.Write(image, 0, image.Length);
  8.                 Bitmap bitmap = new Bitmap(stream);
  9.                 Response.ContentType = "image/png";
  10.                 bitmap.Save(Response.OutputStream, ImageFormat.Png);
  11.             }
  12.             finally
  13.             {
  14.                 stream.Close();
  15.             }
TIA

Don
Jan 19 '10 #1
0 1215

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Jason Murry | last post by:
I have a camera system (Axis) which stores JPG via FTP 1-10fps. There is also a motion jpg live stream. I am trying to store these images either in JPG or in video format so they can be...
9
by: Steffen Brodowski | last post by:
Hello everyone, since one week, I'm programming with python. Its a realy interesting tool. I wrote a script for generating barcodes in jpg-format. Everything is ok, but my function...
4
by: malcolm | last post by:
I've seen several posts around the Internet and many of them either don't work or only partially work. All I'm trying to do is record some action asynchronously from an html file, a sort of logging...
0
by: Jerry J | last post by:
I have a third party image viewer that can display various types of images. The image viewer is ActiveX and lives inside of Internet Explorer. To get the image viewer to retrieve an image, java...
4
by: David W. Simmonds | last post by:
Is there a way I can have a button on a ASP.NET form that when clicked will allow the user to save the image to a file on the client side? I know that the user can simply rclick the image and...
1
by: BluDog | last post by:
Hi I have a class that has a System.Drawing.Image as a property, i would like to display this image on my WebForm, however i think i need to get it into a System.Web.UI.WebControls.Image object,...
1
by: Stephen | last post by:
Hi, I am using an Access database (OLE Object) and storing Image as a bytes after streaming. I am able to read it back as a stream and display it on the browser using the following code:...
3
by: Tom John | last post by:
Hi I am using Office Web Components to generate a GIF image, which i want to display in a picture box. However i am having a problem when i attempt to load the image into the picture box....
4
by: Greg | last post by:
I've searched everywhere for a solution Microsoft .NET Framework V 2.0.50727 AutoEventWireup="false" image2.aspx resize an image on the fly but Page_Load is triggered twice: Any suggestion?...
0
by: =?Utf-8?B?RG9jdG9y?= | last post by:
I am making an application that streams video from a web camera onto the client area of a PictureBox on a Windows CLR Form in MS Visual Studio 2005 (using C++). The streaming video works fine, and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.