locked
Total Newb Question RRS feed

  • Question

  • User436273434 posted
    I'm completely new to GDI+, and want to make a server utility for image resizing and compression, but I can't even seem to get off the starting block because of a problem I'm having. In a Windows test app for the utility, I have: FileStream fs = new FileStream( txtPath.Text, FileMode.Open, FileAccess.Read ); Bitmap bmp = new Bitmap( fs ); bmp.Save(@"C:\temp\blah.jpg", ImageFormat.Jpeg); I open a .jpg, and just want to save it somewhere else, but attempting to do so (at the save line) results in an ever-helpful "Generic GDI+ Error" that doesn't begin to lead me to the source of my error. What am I doing wrong?
    Saturday, March 20, 2004 12:37 AM

All replies

  • User-1372641848 posted
    Bitmap bmp = new Bitmap(txtPath.Text); bmp.Save(@"C:\temp\blah.jpg", ImageFormat.Jpeg);
    Wednesday, March 24, 2004 7:57 AM
  • User436273434 posted
    Thanks, but it didn't work, unfortunately. :-(
    Thursday, March 25, 2004 11:37 PM
  • User436273434 posted
    Can anyone get either method to compile and function correctly?
    Thursday, March 25, 2004 11:53 PM
  • User436273434 posted
    It turns out the only problem was that the "\temp" directory didn't already exist. The good news is that my image compression/resizing utility works great!
    Friday, March 26, 2004 1:34 AM