def validate ( self, object, name, value ):
        from pyface.image_resource import ImageResource

        if value is None:
            return None

        new_value = convert_image( value, 4 )
        if isinstance( new_value, ImageResource ):
            return new_value

        self.error( object, name, value )
Validates that a specified value is valid for this trait.
dataset/ETHPy150Open enthought/traitsui/traitsui/ui_traits.py/Image.validate