Home > Net >  C # read image pixels change
C # read image pixels change

Time:02-23

Read the image code is as follows:

Image img=Image. FromFile (imgPath);

Int width=img. Width;
Int height=img. Height;

MemoryStream ms=new MemoryStream ();

If (img. RawFormat. Guid==System. Drawing. The Imaging. ImageFormat. Bmp, Guid)
Img. Save (ms, System. Drawing. Imaging. ImageFormat. Bmp);

Byte [] fileBytes=Ms. ToArray ();

The original image and read after the image is as follows:


The diagram, the above 1. BMP is read out the effect of
The barcode below. BMP is the original image
It is obvious that 1. BMP into some of the pixel gray,
If the address, please?


  • Related