StrToPixelType (replaces StrToDatatype)


The PixelTypeToStr function returns the pixel type number corresponding to the pixel type name. For example passing "float" returns 5.

Syntax

number = StrToPixelType( string )

bullet.gif    string is the pixel type name from the Pixel Types table.

bullet.gif    numberis the pixel type code from the Pixel Types table.

Example

The example below converts pixel type "float" to to its number:

 

s = "float"

-- pixel type "float"

t = StrToPixelType( s )

-- get the corresponding number

Printf("name=%s, stype=%d", s, t )

-- result: name="float"type=5

Related Topics

PixelTypeToStr, CImage:SetPixelType, Pixel Types


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.