I have an application that use the image captured by the mobile camera and sends it to a webservice. Currently I am putting the image in a byte[] which then will be transmitted. This is done by:
filename = cameracapturedialog.FileName;
FileStream fs = new FileStream(filename, FileMode.Open);
byte[] ImageByte = new byte[fs.Length]; //file to send
fs.Read(ImageByte, 0, Convert.ToInt32(fs.Length));
But now I would like to perform some processing (resizing), hence I had to put the image into a BITMAP object, and after the processing I will convert it back to JPEG.
Is there a way to convert a JPEG into Bitmap and then back to JPEG without having no changes in the pixels (for testing I will perform no processing on the Bitmap)? Hence if I compare the first JPEG with the second JPEG I need that the files will be exactly the same.
What do you think the best solution is? Can I use something else instead of Bitmap. Any suggestion with some code will be greatly appreciated.
thanks
ReplyQuote