The Code is as follows:
Private void button1_click (Object sender, eventargs e) {Bitmap bitmap = new Bitmap (path. getdirectoryname (assembly. getexecutingassembly (). getname (). codebase. tostring () + "\ checktable \ select standard .jpg"); // convert the image to a binary stream memorystream MS = NULL; byte [] byteimage; try {MS = new memorystream (); bitmap. save (MS, imageformat. JPEG); byteimage = new byte [Ms. length]; byteimage = Ms. toarray (); // send byteimage} catch (argumentnullexception ex) {Throw ex;} finally {Ms. close () ;}// the binary stream is converted to the image memorystream = NULL; try {stream = new memorystream (byteimage ); // byteimage is the received binary array image bitmapnew = (image) New Bitmap (Stream); bitmapnew. save (path. getdirectoryname (assembly. getexecutingassembly (). getname (). codebase. tostring () + "\ checktable \ xin.jpg", imageformat. JPEG);} catch (argumentnullexception ex) {Throw ex;} catch (argumentexception ex) {Throw ex;} finally {stream. close ();}}
Reference: click ....