In asp.net, Image class is usually used to write images. May it would have other drawbacks but I faced an issue which I am sharing:
Problem:
My Image was CMYK format when I saved my image using Image class it converted it from CMYK to RGB which was not required.
Solution:
I was using FileUpload control to get the bytes when I commented all the code which involved FileStream and MemoryStream and I just used FileUpload1.SaveAs (filePath);
It solved my problem.
Problem:
My Image was CMYK format when I saved my image using Image class it converted it from CMYK to RGB which was not required.
Solution:
I was using FileUpload control to get the bytes when I commented all the code which involved FileStream and MemoryStream and I just used FileUpload1.SaveAs (filePath);
It solved my problem.