Table of Contents

 
GetImageWidth
 

Purpose

Queries the surface of the given image or the main surface

 

Protoype

int CImageMngr::GetImageWidth (string str_img_id, int i_flags = IMAGE)
 

Parameters

img_id the ID of the image to query
flags whether to extract cell (CELL) or surface (IMAGE) data
 

Description

This function is used to get the width of a surface. You can either get the width of an image object by passing in its ID for str_img_id or you can get the width of the primary surface by passing in PRIMARY instead. If you want to get the width of an image object, you can also specify whether you want to get the width of the entire image by passing in IMAGE for i_flags or just the width of cell in a template by passing CELL instead.

 

Use

CImageMngr image;
// get the width of the primary surface
int width = image.GetImageWidth(IMAGE, PRIMARY);
// get the width of cells in a template
width = image.GetImageWidth(CELL, "my_image");
 

Prev: GetImageRGB
Next: GetImageX