var bmpOutput = new Bitmap(@"1_0.jpg");
foreach (var item in bmpOutput.PropertyItems)
{
var id = item.Id; // 20625
var length = item.Len; // 128
var type = item.Type; // 3 ( MSDN says that 3 : Specifies that Value is an array of unsigned short (16-bit) integers.
var byteArray = item.Value; // length 128
var result = BitConverter.ToUInt16(byteArray, 0); // 1 but must be 96
}
I try to retrieve image dpi, but I can't convert the byte array to an integer value. I want to get vertical and horizontal resolution from jpg(96x96).