image manipulation problem in .net

Results 1 to 2 of 2

Thread: image manipulation problem in .net

  1. #1
    Join Date
    Dec 1969

    Default image manipulation problem in .net

    I&#039;ve got a form that lets a user upload an image to preview it. What we&#039;re trying to do is allow the user to rotate the image. I&#039;ve got it working the first time they rotate it. However, the 2nd time they try to rotate the image, I&#039;m getting a generic gdi+ exception on the line where it says img.Save(lblUploadedImage.Text.Trim());<BR><BR>I figured that somehow it still has a handle to the original file and it can&#039;t overwrite it? But I&#039;m not sure if that&#039;s it because I specifically dispose of my image at the end of this method. Does anyone have any ideas of what I might try to get this to save properly? Thanks.<BR><BR>System.Drawing.Image img = System.Drawing.Image.FromFile(lblUploadedImage.Tex t);<BR> img.RotateFlip(rft);<BR><BR> try<BR> {<BR> img.Save(lblUploadedImage.Text.Trim());<BR> }<BR> catch(Exception exc)<BR> {<BR> Response.Write(exc.ToString());<BR> }<BR><BR> img.Dispose(); img = null;

  2. #2
    Join Date
    Dec 1969

    Default my guess...

    ASPNET User (if Win 2k or XP) or "MACHINE ACCOUNT" (if Win 2k3) has "Write" permissions, but not "Modify" permissions

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts