IGxICMManager.TranslateImage

Syntax

TranslateImage(Source: IGxImage): IGxImage;

Parameters

Source - image that is transformed.

Description

The TranslateImage method transforms the specified image in accordance with the palette of the specified color profile.

Comments

The color profile is specified in the ICMProfile property. The method returns the image that is displayed by the device when using the specified color profile.

Example

Executing the example requires a form that contains a button named Button1 and two components ImageBox  named SourceImg and DestImg. The operating system contains the ProPhoto color profile file and the file with the image c:WorkImage.bmp.

Class TestForm: Form
    Button1: Button;
    SourceImg: ImageBox;
    DestImg: ImageBox;

    Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Var
        ICMMan: IGxICMManager;
        Img1, Img2: IGxImage;
    Begin
        ICMMan := New GxICMManager.Create;
        ICMMan.ICMProfile := "ProPhoto";
        Img1 := New GxImage.CreateFromFile("c:\Work\Image.bmp");
        Img2 := ICMMan.TranslateImage(Img1);
        SourceImg.Image := Img1;
        DestImg.Image := Img2;
    End Sub Button1OnClick;

End Class TestForm;

After starting the form clicking the button transforms the loaded file in accordance with the palette of the specified color profile. The initial image is displayed in the SourceImg component, the transformed image is displayed in the DestImg component.

See also:

IGxICMManager