You are here: GdPicture.NET > Documentation > Classes > GdPictureImaging Class > GdPictureImaging Methods > Saving GdPicture Image > SaveAsTGA Method
logo.gif
ContentsIndexHome
PreviousUpNext
GdPictureImaging.SaveAsTGA Method

Saves a GdPicture image as Truevision TARGA image format.

C#
public GdPictureStatus SaveAsTGA(
    int ImageID, 
    String FilePath
);
Visual Basic
Public Function SaveAsTGA(
    ByVal ImageID As Integer, 
    ByVal FilePath As String
) As GdPictureStatus
Parameters
Parameters 
Description 
ImageID 
GdPicture Image Identifier.  
FilePath 
The complete file path to save a GdPicture image.  
Returns

A member of the GdPictureStatus enumeration.

This function works only with 8-bits, 16-bits, 24-bits and 32-bits images. 

Use the IsPixelFormatHasAlpha(ImageID) function to check if a GdPicture image has an alpha component.

How to convert BMP file to Truevision TARGA image format.

Dim ImageID As Integer
 
ImageID = oGdPictureImaging.CreateGdPictureImageFromFile("image.bmp")
If ImageID <> 0 Then
   oGdPictureImaging.SaveAsTGA (ImageID, "image.tga")
   oGdPictureImaging.ReleaseGdPictureImage (ImageID)
End If
What do you think about this topic? Send feedback!
Copyright (c) 2009-2011 www.gdpicture.com. All rights reserved.