c# - Bitmap <-> JPEG Conversion -


i have application use image captured mobile camera , sends webservice. putting image in byte[] transmitted. done by:

filename = cameracapturedialog.filename; filestream fs = new filestream(filename, filemode.open);  byte[] imagebyte = new byte[fs.length]; //file send fs.read(imagebyte, 0, convert.toint32(fs.length)); 

but perform processing (resizing), hence had put image bitmap object, , after processing convert jpeg.

is there way convert jpeg bitmap , jpeg without having no changes in pixels (for testing perform no processing on bitmap)? hence if compare first jpeg second jpeg need files same.

what think best solution is? can use else instead of bitmap. suggestion code appreciated.

jpg lossy format. lose information because of way encoding algorithm works. you'll never original image jpg, no matter encoder use.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -