Packagede.popforge.imageprocessing.utils
Classpublic final class FormatTest

The FormatTest class provides two methods to check if an Image format is required or denied.

You can use the bitwise OR operator (|) to combine ImageFormat constants to indicate multiple formats.

See also

de.popforge.imageprocessing.core.ImageFormat


Public Methods
 MethodDefined by
  
deny(image:Image, format:int):void
[static] Checks if the given Image object belongs to the denied format.
FormatTest
  
require(image:Image, format:int):void
[static] Checks if the given Image object belongs to the required format.
FormatTest
Method detail
deny()method
public static function deny(image:Image, format:int):void

Checks if the given Image object belongs to the denied format.

Parameters
image:Image — The Image object that should not belong to the required format.
 
format:int — A value based on ImageFormat. Can be combined using the OR operator (|).

Throws
InvalidImageFormatError — Image belongs to the denied format.
require()method 
public static function require(image:Image, format:int):void

Checks if the given Image object belongs to the required format.

Parameters
image:Image — The Image object that should belong to the required format.
 
format:int — A value based on ImageFormat. Can be combined using the OR operator (|).

Throws
InvalidImageFormatError — Image does not belong to the required format.