ImageGear v26.3 - Updated
ImageGear.Core Assembly / ImageGear.Formats Namespace / ImGearSaveOptions Class / ForceColorspace Property

In This Topic
    ForceColorspace Property
    In This Topic
    Gets or sets the value indicating that images should only be saved in the specified color space.
    Public Property ForceColorspace As ImGearColorSpaceIDs
    Dim instance As ImGearSaveOptions
    Dim value As ImGearColorSpaceIDs
    instance.ForceColorspace = value
    value = instance.ForceColorspace
    public ImGearColorSpaceIDs ForceColorspace {get; set;}
    public: __property ImGearColorSpaceIDs get_ForceColorspace();
    public: __property void set_ForceColorspace( 
       ImGearColorSpaceIDs value
    property ImGearColorSpaceIDs ForceColorspace {
       ImGearColorSpaceIDs get();
       void set (    ImGearColorSpaceIDs value);

    Property Value

    ImageGear.Core.ImGearColorSpaceIDs enumeration.
    Set this property to a specific color space ID to tell ImageGear use only this color space for image saving. If the file format supports this color space for saving, and other settings and control parameters allow saving to this color space, the image will be saved with the specified color space. Otherwise, ImageGear will throw an exception with ImageGear.Core.ImGearErrorCodes.CANT_SAVE_FORMAT error code.

    This mode can be used for conversion of image files from one color space to another, without having to store converted image in memory. To convert an image, load it into ImageGear, set ForceColorspace to desired color space, and save the image.

    If the property is set to ImageGear.Core.ImGearColorSpaceIDs.NONE, ImageGear does not force conversion to any color space, and saves the image using the color space that is supported by the saving format and best matches the source image.

    The default value is ImageGear.Core.ImGearColorSpaceIDs.NONE.

    See Also