Saving a bitmap form a asp.net page

M

Mats Boberg

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.
 
K

Kevin Spencer

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 said:
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.
 
M

Mats Boberg

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 said:
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 said:
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.
 
H

Herman Kheyfets

Check if directory where you try to save bitmap have write permission for
ASPNET user

Gerasha
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top