467,219 Members | 1,458 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,219 developers. It's quick & easy.

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
  • viewed: 2103
Share:
3 Replies
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*********@hotmail.com> wrote in message
news:uW**************@TK2MSFTNGP09.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******@takempis.com> wrote in message
news:OS**************@tk2msftngp13.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*********@hotmail.com> wrote in message
news:uW**************@TK2MSFTNGP09.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*********@hotmail.com> wrote in message
news:uW**************@TK2MSFTNGP09.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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by CodeRazor | last post: by
4 posts views Thread by melanieab | last post: by
5 posts views Thread by Thaynann | last post: by
21 posts views Thread by Michael Turner | last post: by
5 posts views Thread by Steve Marshall | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.