using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.bmp");
// Set the active FTP transfer more.
gdpictureImaging.SetFtpPassiveMode(false);
if (gdpictureImaging.SaveToFTP(imageID, GdPicture14.DocumentFormat.DocumentFormatJPEG, 75, "ftp.com", "/demo/image.jpg", "user", "password", 21) != GdPictureStatus.OK)
{
MessageBox.Show("Saving failed. Status: " + gdpictureImaging.GetStat() + "\nError: " + gdpictureImaging.GetLastTransferError(),
"Saving using FTP", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
gdpictureImaging.ReleaseGdPictureImage(imageID);
}