SilverScreen Solid Modeler

get_image_info

get_image_info

Previous topic Next topic  

get_image_info

Previous topic Next topic JavaScript is required for the print function  

 

SilverScreenAPI

 

BOOLEAN get_image_info ( const char *image_path, SS_IMAGE_INFO *ii )

 

const char    *image_path;   // A pointer to a null-terminated string

SS_IMAGE_INFO *ii;           // A pionter to an SS_IMAGE_INFO structure

 

 




Synopsis

#include "silver.h"

 

The get_image_info function retrieves information about an image file.

 

 

Parameters

image_path is a null-terminated string that contains a full path to the image

ii is an SS_IMAGE_INFO structure that will receive image information

 

 

Return Value

get_image_info returns TRUE if the image is present and is valid, and FALSE otherwise.

 

 

Remarks

When no path is supplied SilverScreen's library directory is assumed.

 

 

See Also

path_library

 

 

Example

The following code retrieves information about a Windows Bitmap named brick128.bmp. The image is assumed to be in SilverScreen's library directory:

C / C++ Code

 

 #include "silver.h

 

 . . .

 

 SS_IMAGE_INFO ii;

 

 if ( get_image_info("brick128.bmp", &ii) )

    {

    error_message("Width %d Height %d BPP %d Colors %d",

                     ii.pixel_width,

                     ii.pixel_height,

                     ii.bits_per_pixel,

                     ii.number_of_colors);

 

    error_message("XResolution %d YResolution %d",

                     ii.horizontal_DPI,

                     ii.vertical_DPI);

 

    error_message("Texture Width %d Height %d",

                     ii.texture_width_PO2,

                     ii.texture_height_PO2);

    }