Read BITMAPINFOHEADER and get width and height of the image
Posted on 2006-04-25
i wrote some code :
FileStream fs = File.OpenRead(@"c:\Zapotec.bmp");
BinaryReader breader = new BinaryReader(fs);
Int32 width = breader.ReadInt32();
Int32 height = breader.ReadInt32();
Int16 biBitCount = breader.ReadInt16();
but i am getting very large number in width and in height
please help me to get the right size.
becouse if i am loading this image for example:
Bitmap bmp = new Bitmap(@"c:\Zapotec.bmp");
bmp.width and bmp.height much smoller.
please help me
i need only this 2 parameters and we are working with very big images so we can't load image we need only to get this 2 parameters.