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

Saves a GdPicture image as Portable Network Graphics image format.

C#
public GdPictureStatus SaveAsPNG(
    int ImageID, 
    String FilePath
);
Visual Basic
Public Function SaveAsPNG(
    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.

How to convert BMP file to Portable Network Graphics file

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