Saving a bitmap form a asp.net page

Discussion in 'ASP .Net' started by Mats Boberg, Jun 8, 2004.

  1. Mats Boberg

    Mats Boberg Guest

    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.
     
    Mats Boberg, Jun 8, 2004
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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.
    >
    >
     
    Kevin Spencer, Jun 8, 2004
    #2
    1. Advertising

  3. Mats Boberg

    Mats Boberg Guest

    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" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:...
    > > 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.
    > >
    > >

    >
    >
     
    Mats Boberg, Jun 8, 2004
    #3
  4. Check if directory where you try to save bitmap have write permission for
    ASPNET user

    Gerasha

    "Mats Boberg" <> wrote in message
    news:...
    > 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.
    >
    >
     
    Herman Kheyfets, Jun 8, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joseff
    Replies:
    1
    Views:
    504
    Hermit Dave
    Jan 9, 2004
  2. Jeronimo Bertran

    Saving a bitmap in session state

    Jeronimo Bertran, Oct 7, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    346
    Francisco Fagas[MVP ASP/ASP.NET]
    Oct 7, 2004
  3. Replies:
    11
    Views:
    778
    Mythran
    Mar 17, 2006
  4. Gandalf

    Masked bitmap from bitmap

    Gandalf, Jan 29, 2004, in forum: Python
    Replies:
    0
    Views:
    587
    Gandalf
    Jan 29, 2004
  5. xqggz
    Replies:
    1
    Views:
    425
    Victor Bazarov
    Jun 19, 2007
Loading...

Share This Page