Bitmap Outputing Characters
-
I have some code that creates an image by putting a bunch of images together. If I return the result as a JPEG or GIF it works fine. But when I return it as a BMP it returns a bunch or characters instead of a picture. Any ideas on why?
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
-
I have some code that creates an image by putting a bunch of images together. If I return the result as a JPEG or GIF it works fine. But when I return it as a BMP it returns a bunch or characters instead of a picture. Any ideas on why?
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
Can you clarify what you mean by 'return the result'. Are you using a
Bitmap
object?myBitmap.Save("bitmap.bmp", System.Drawing.Imaging.ImageFormat.Bmp);
-
Can you clarify what you mean by 'return the result'. Are you using a
Bitmap
object?myBitmap.Save("bitmap.bmp", System.Drawing.Imaging.ImageFormat.Bmp);
Yes I am using a Bitmap object. The wierd part is it works if it is a JPEG or GIF, not BMP... myBitmap.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Bmp);
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
-
I have some code that creates an image by putting a bunch of images together. If I return the result as a JPEG or GIF it works fine. But when I return it as a BMP it returns a bunch or characters instead of a picture. Any ideas on why?
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
What object are you returning, to see a 'bunch of characters' ? Why do people ask questions like this and not post the code ? If you write code that returns a Bitmap, you'll get a bitmap. If you're not getting that, we need to see the code to say what's wrong with it.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
What object are you returning, to see a 'bunch of characters' ? Why do people ask questions like this and not post the code ? If you write code that returns a Bitmap, you'll get a bitmap. If you're not getting that, we need to see the code to say what's wrong with it.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
Code Removed
-- modified at 20:30 Monday 26th February, 2007The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
-
Code Removed
-- modified at 20:30 Monday 26th February, 2007The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
OK, it's an ASP.NET question. You should ask those in the ASP.NEt forum, or at least make that clear. Why on earth would you send a BMP through a web page anyhow, when gif and jpg are smaller ? I would not be surprised in the browser does not support them, I think BMP is a windows format ( it's raw data with a header which I think is Windows specific ).
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
OK, it's an ASP.NET question. You should ask those in the ASP.NEt forum, or at least make that clear. Why on earth would you send a BMP through a web page anyhow, when gif and jpg are smaller ? I would not be surprised in the browser does not support them, I think BMP is a windows format ( it's raw data with a header which I think is Windows specific ).
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
I have seen that a way to make dynamic images is to use an aspx page with a Response.OutputStream and then assign that page as the ImageUrl in a Image Component. It works for JPEG and GIF. My problem is transparency. JPEG and GIF output results in a black background. I guess I could ask, how do I get the background of my outputed JPEG or GIF image to be transparent? Or do you know another way to make my own image and output it on a custom control? And I did forget to mention it is a ASP.NET app, so keep that in mind.
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
-
I have seen that a way to make dynamic images is to use an aspx page with a Response.OutputStream and then assign that page as the ImageUrl in a Image Component. It works for JPEG and GIF. My problem is transparency. JPEG and GIF output results in a black background. I guess I could ask, how do I get the background of my outputed JPEG or GIF image to be transparent? Or do you know another way to make my own image and output it on a custom control? And I did forget to mention it is a ASP.NET app, so keep that in mind.
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
There certainly is no transparency support in BMP. I believe PNG is the only format that has transparency built in.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
There certainly is no transparency support in BMP. I believe PNG is the only format that has transparency built in.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
.NET has a method MakeTransparent(Color), when you use that method it simply doesn't draw the pixels with the color passed to MakeTransparent. I have another idea. How can I pass a Color from one page to another?
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
-
.NET has a method MakeTransparent(Color), when you use that method it simply doesn't draw the pixels with the color passed to MakeTransparent. I have another idea. How can I pass a Color from one page to another?
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.
Ok, I made a variable and it always used the default I set to it since I commented out a line for testing. I uncommented have it works. Those are the errors I love!
The only way to speed up a Macintosh computer is at 9.8 m/sec/sec.