TgaImage

TgaImage constructor (1 of 3)

Initializes a new instance of the TgaImage class.

public TgaImage(string path)
ParameterTypeDescription
pathStringThe path to load an image.

Exceptions

exceptioncondition
ArgumentNullExceptionSpecified path is null.

See Also


TgaImage constructor (2 of 3)

Initializes a new instance of the TgaImage class.

public TgaImage(RasterImage rasterImage)
ParameterTypeDescription
rasterImageRasterImageThe raster image.

Examples

Loading of the PNG image, conversion of it to the TgaImage and saving as a TGA image.

[C#]

using (RasterImage image = (RasterImage)Image.Load("test.png"))
{
    using (TgaImage tgaImage = new TgaImage(image))
    {
        tgaImage.Save("test.tga");
    }
}

See Also


TgaImage constructor (3 of 3)

Initializes a new instance of the TgaImage class.

public TgaImage(Stream stream)
ParameterTypeDescription
streamStreamThe stream to load an image.

See Also