Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. An Error Occured While Saving Scan Image

An Error Occured While Saving Scan Image

Scheduled Pinned Locked Moved C#
helpvisual-studiowinformsgraphics
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sanket Patil
    wrote on last edited by
    #1

    Hi Everybody, I have developed A Desktop Application in VS 2008. In This One Facility Is Provided To Scan The Document. Firstly It Was Working Fine , But Now A Days I Am Getting The Error a generic error occurred in gdi+ While Saving The File. I Have Set All The Permission To The File Where The Scanned Image Is Saved. I AM Unable To Resolve The Problem. Please Help Me To Solve My Problem. Thanks & Regards Sanket Patil :)

    .

    D A R 3 Replies Last reply
    0
    • S Sanket Patil

      Hi Everybody, I have developed A Desktop Application in VS 2008. In This One Facility Is Provided To Scan The Document. Firstly It Was Working Fine , But Now A Days I Am Getting The Error a generic error occurred in gdi+ While Saving The File. I Have Set All The Permission To The File Where The Scanned Image Is Saved. I AM Unable To Resolve The Problem. Please Help Me To Solve My Problem. Thanks & Regards Sanket Patil :)

      .

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Without seeing the code where the error occurs, we're just guessing at this. But, from your vague description, it sounds like you loaded a file using the FromFile method of a Bitmap object and now are trying to save that same file to it's original filename. This doesn't work because the file is locked open for the entire lifetime of the Bitmap object. To get around this, you open the file using a FileStream object, then pass that stream to the contructor of your bitmap object, then close the file. This prevents the file from being locked and will allow you to dave the new image back to the original filename.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak

      1 Reply Last reply
      0
      • S Sanket Patil

        Hi Everybody, I have developed A Desktop Application in VS 2008. In This One Facility Is Provided To Scan The Document. Firstly It Was Working Fine , But Now A Days I Am Getting The Error a generic error occurred in gdi+ While Saving The File. I Have Set All The Permission To The File Where The Scanned Image Is Saved. I AM Unable To Resolve The Problem. Please Help Me To Solve My Problem. Thanks & Regards Sanket Patil :)

        .

        A Offline
        A Offline
        Abhinav S
        wrote on last edited by
        #3

        This[^] might be able to help you.

        The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it. My latest tip/trick

        1 Reply Last reply
        0
        • S Sanket Patil

          Hi Everybody, I have developed A Desktop Application in VS 2008. In This One Facility Is Provided To Scan The Document. Firstly It Was Working Fine , But Now A Days I Am Getting The Error a generic error occurred in gdi+ While Saving The File. I Have Set All The Permission To The File Where The Scanned Image Is Saved. I AM Unable To Resolve The Problem. Please Help Me To Solve My Problem. Thanks & Regards Sanket Patil :)

          .

          R Offline
          R Offline
          RaviRanjanKr
          wrote on last edited by
          #4

          This link[^] refer some such type of problem with solution. hope it will works for you.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups