BExplorer.Shell.Interop.Gdi32.GetBitmapDimentions C# (CSharp) Method

GetBitmapDimentions() public static method

public static GetBitmapDimentions ( IntPtr ipd, int &width, int &height ) : void
ipd System.IntPtr
width int
height int
return void
		public static void GetBitmapDimentions(IntPtr ipd, out int width, out int height) {
			// get the info about the HBITMAP inside the IPictureDisp
			var dibsection = new DIBSECTION();
			var res = GetObjectDIBSection(ipd, Marshal.SizeOf(dibsection), ref dibsection);
			width = dibsection.dsBm.bmWidth;
			height = dibsection.dsBm.bmHeight;
		}