Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Image.GetVerticalResolution method

Applies to: desktop apps only

The Image::GetVerticalResolution method gets the vertical resolution, in dots per inch, of this image.

Syntax

REAL GetVerticalResolution();

Parameters

This method has no parameters.

Return value

Type:

Type: REAL

This method returns the vertical resolution, in dots per inch, of this image.

Examples

The following console application creates an Image object from a JPEG file. The code obtains the vertical resolution of the image, in dots per inch, by calling the Image::GetVerticalResolution method.


#include <windows.h>
#include <gdiplus.h>
#include <stdio.h>
using namespace Gdiplus;

INT main()
{
   GdiplusStartupInput gdiplusStartupInput;
   ULONG_PTR gdiplusToken;
   GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);

   Image* image = new Image(L"Crayons.jpg");
   REAL res = image->GetVerticalResolution();
   printf("The vertical resolution is %f dots per inch.\n", res);

   delete image;  
   GdiplusShutdown(gdiplusToken);
   return 0;
}

Requirements

Minimum supported client

Windows XP, Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Product

GDI+ 1.0

Header

Gdiplusheaders.h (include Gdiplus.h)

Library

Gdiplus.lib

DLL

Gdiplus.dll

See also

Image
Bitmap
Image::GetHeight
Image::GetHorizontalResolution
Image::GetWidth
Using Images, Bitmaps, and Metafiles
Images, Bitmaps, and Metafiles

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

Show:
© 2015 Microsoft