ImageInfo Class

[size=150]ImageInfo Class[/size]

New in Draft 1.1

ImageInfo
Type: Class
Description: A class that contains image file properties.
Properties:
[list]tileSize – A tuple of two integers indicating the width and height (width, height) of the tiles in an image, or None if the image does not have tiles. (Defaults to None.)
Usage:

  • to determine whether an EXR file is tiled -imageInfo = Draft.ImageInfo() image = Draft.Image.ReadFromFile( '//path/to/test.exr', imageInfo=imageInfo ) if imageInfo.tileSize is None: print "Image is not tiled" else: print "Image is tiled"
  • or, to write a tiled EXR file -[code]imageInfo = Draft.ImageInfo()
    imageInfo.tileSize = ( 32, 32 )

image = Draft.Image.CreateImage( 1920, 1080 )
image.WriteToFile( ‘//path/to/out.exr’, imageInfo=imageInfo )[/code]

  • or, to preserve an EXR file’s tile or scanline settings -imageInfo = Draft.ImageInfo() image = Draft.Image.ReadFromFile( '//path/to/in.exr', imageInfo=imageInfo ) image.ApplyGamma( 1.8 ) image.WriteToFile( '//path/to/out.exr', imageInfo=imageInfo )[/list:u]
Privacy | Site terms | Cookie preferences