Function _IrrGetImageInformation

au3Irr2

au3Irr2 Function Reference

_IrrGetImageInformation

Get information of an image. The width, height, pitch and color format is returned in an array.

#Include <au3Irrlicht2.au3>
_IrrGetImageInformation($h_Image)

 

Parameters

$h_Texture Handle to an irrlicht image object

 

Return Value

Success: 1D Array with the information
    $Array[0] = Width of the image
    $Array[1] = Height of the image
    $Array[2] = Pitch of the image
    $Array[3] = Color Reference of the image (e.g.: $ECF_A1R5G5B5, $ECF_R5G6B5, $ECF_R8G8B8, $ECF_A8R8G8B8)
Failure: Empty Array and Sets @error to 1

 

Remarks

This function cannot be used for texture objects. For this, use _IrrGetTextureInformation instead.

 

Related

_IrrGetImage, _IrrGetTextureInformation

 

Example


#include <au3Irrlicht2.au3>

_IrrStart()

Local $hLogo = _IrrGetImage("./media/Cross.bmp")

Local $aInfo = _IrrGetImageInformation($hLogo)
If Not @error Then MsgBox(64, "Image Information", "Width: " & $aInfo[0] & @LF & _
                          "Height: " & $aInfo[1] & @LF & "Pitch: " & $aInfo[2] & @LF & _
                          "Color Format: " & $aInfo[3])
_IrrStop()