title: C# Save image without using Dialog
body: <p>I am having trouble saving a user uploaded image to my "logos" file when the user presses "Save Team" on my form.</p>
  
  <p>For you to get a taster of what the application does I have provided a <a href="http://gyazo.com/0c9b2cf308a7467f55da3110b0716522" rel="nofollow">screenshot here</a>, upon pressing add team all the text box data is written to a text file and I want the image to automatically save into a predefined folder "logos", however I get the GDI++ error whenever I press save.</p>
  
  <p>After reading through a few old threads on the web, I found that it could be caused by a few things such as file permissions, file size, the files name or even an open stream.</p>
  
  <p>Below is the code I am currently using to save out my file which prompts the error:</p>
  
  <pre><code>     private void btnAddTeam_Click(object sender, EventArgs e)
      {
          //VALIDATION FOR TEXT FILE AND OTHER STUFF HERE...
  
          //SAVE THE IMAGE FILE
          string filePath = picTeamLogo.ImageLocation;
          Image tempImage = Image.FromFile(filePath);
  
          tempImage.Save(@"../logos/");
      }
  </code></pre>
  
  <p>If you are viewing the screenshot, please do not get confused by "arsenal.png" I am aware that that is not the full file path, its conversion is handled in another method, as only the filename is required to be written to the text file.</p>
  
  <p>If anybody has any ideas on where I am going wrong then please point me in the right direction, vague errors such as the GDI one I just received are such a headache!</p>
  
  <p><br/>
  Alex.</p>