473,545 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Saving a bitmap form a asp.net page

Hi,

I have problems with saving a bitmap to hdd from my asp.net page

I get the following error: "A generic error occurred in GDI+."

Code:

Bitmap bmp = new Bitmap(240,120) ;

bmp.Save([path]);

/Mats.
Nov 18 '05 #1
3 2301
Hi Mats,
I have problems with saving a bitmap to hdd from my asp.net page
That goes without saying! ;-)

However, your code means nothing as you've posted it. It has no context, and
you didn't describe exactly what you are trying to achieve with this. For
example, are you talking about having the client browser download an image
that you create on the fly somehow? What exactly is this image supposed to
be? Or, do you want them to be able to save an image that is IN the HTML
document to their hard drive? Or, perhaps, do you want to have them upload
an image to the server and save it there?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Mats Boberg" <ma*********@ho tmail.com> wrote in message
news:uW******** ******@TK2MSFTN GP09.phx.gbl... Hi,

I have problems with saving a bitmap to hdd from my asp.net page

I get the following error: "A generic error occurred in GDI+."

Code:

Bitmap bmp = new Bitmap(240,120) ;

bmp.Save([path]);

/Mats.

Nov 18 '05 #2
Hi,

I have an array with int values that i post to a asp.net page.

I create a bitmap ín memory and insert the values as points to create the
"image"...

Then i want to save the bitmap to disk.

Quite simple...

I've tested to just create a bitmap in memory and save it but i always get
the same error as i wrote before...

/Mats.
"Kevin Spencer" <ks******@takem pis.com> wrote in message
news:OS******** ******@tk2msftn gp13.phx.gbl...
Hi Mats,
I have problems with saving a bitmap to hdd from my asp.net page
That goes without saying! ;-)

However, your code means nothing as you've posted it. It has no context,

and you didn't describe exactly what you are trying to achieve with this. For
example, are you talking about having the client browser download an image
that you create on the fly somehow? What exactly is this image supposed to
be? Or, do you want them to be able to save an image that is IN the HTML
document to their hard drive? Or, perhaps, do you want to have them upload
an image to the server and save it there?

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Mats Boberg" <ma*********@ho tmail.com> wrote in message
news:uW******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

I have problems with saving a bitmap to hdd from my asp.net page

I get the following error: "A generic error occurred in GDI+."

Code:

Bitmap bmp = new Bitmap(240,120) ;

bmp.Save([path]);

/Mats.


Nov 18 '05 #3
Check if directory where you try to save bitmap have write permission for
ASPNET user

Gerasha

"Mats Boberg" <ma*********@ho tmail.com> wrote in message
news:uW******** ******@TK2MSFTN GP09.phx.gbl...
Hi,

I have problems with saving a bitmap to hdd from my asp.net page

I get the following error: "A generic error occurred in GDI+."

Code:

Bitmap bmp = new Bitmap(240,120) ;

bmp.Save([path]);

/Mats.

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
20274
by: Vin | last post by:
Hi, I am using the following code to draw whatever the user draws using x,y. // draws lines directly on a winform. CreateGraphics().DrawLine(APen, x, y, OldX, OldY); Now how do I save the drawing on to a bmp file on my harddisk? C# code in this regard would be very helpful. I tried all forums but invain.
4
4241
by: CodeRazor | last post by:
I'm unfamiliar with image manipulation using c#. How can i resize a jpg that currently exists in a file and save it resized as a new file. The examples i've found have been a bit misleading for my particular requirements.
4
2282
by: melanieab | last post by:
Hi, I'm trying to save a bitmap file so I can print it later. I have Image.Save("sImage.bmp",System.Drawing.Imaging.ImageFormat.Bmp); The file sImage.bmp shows up in the bin\debug folder but when I try to print it (or open it), it's completely black. I know Image is the correct picture because when I immediately print it, it works. What...
5
3129
by: Thaynann | last post by:
I have an app that (at the moment) moves through files that are on a web site, and deletes them, wat i want to do for the next stage, is to be able to download each file before i delete it. i have tried POSTin to be able to view the image, then saving it, but it doesnt work, the problem i have is that all the files on the server have the...
2
3983
by: Brad | last post by:
I have code which takes an image, uploaded from a web page, and saves it to a database. Now I want to always resize an uploaded image before it is saved to the database. My code to resize is below and of course it's not working properly because my web page which displays the resulting image from the database is not showing the image. I...
21
1532
by: Michael Turner | last post by:
Hi Guys I have several images that will be used over and over again on different forms in the same place, I have decided to create a control to save space/time in development, I have create a control which inherits the panel and added three panel control which host the 3 background images ( one to the left the other to the right and one to...
5
2509
by: Steve Marshall | last post by:
Hi all, I am converting an app which used a picturebox to draw graphs etc onto, then saved them to a file. I can certainly draw things onto a picturbox in VB.NET, but how do I save them to a file? I've looked at Bitmap objects, which support saving, but can't see a way to grab what I have drawn and make a bitmap from it, or whatever. ...
2
2507
by: Mark Denardo | last post by:
Hi, I need some expert GDI+ person to help me with my RoundOffImage Function: What I'm trying to do is take in an image, crop off the edges around an ellipse region I set up, and then return the cropped image from the function. I sort of have this working, but not thoroughly. If I take the output image of this function and draw it on my...
17
11822
dbanning
by: dbanning | last post by:
I am trying to save the contents of a form as a bitmap and am unsure how to do this. I can use the savepicture command to save the form as a bitmap but the contents is not intact as you would expect. There is 1 picture box on the form which I wish to save with the form so really a full screen shot of the form. Taking a screen shot and saving it...
0
7664
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7918
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7436
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5981
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5341
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4958
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3446
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1897
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1022
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.