This piece of code loads an image and saves it on the same original folder in the formats supported by GDI+
LOCAL lcSource, lcDestination
lcSource = GETPICT()
lcDestination = JUSTPATH(lcSource) + "\_" + JUSTSTEM(lcSource)
LOCAL loImage AS GpImage OF HOME() + ffc/_gdiplus.vcx
loImage = NEWOBJECT("GpImage", HOME() + "ffc/_gdiplus.vcx")
loImage.CreateFromFile(lcSource)
loImage.SaveToFile(lcDestination + ".jpg","image/jpeg")
loImage.SaveToFile(lcDestination + ".bmp","image/bmp")
loImage.SaveToFile(lcDestination + ".tif","image/tiff")
loImage.SaveToFile(lcDestination + ".gif","image/gif")
loImage.SaveToFile(lcDestination + ".png","image/png")
*!* JPEGs allow to choose the quality of the image
loImage.SaveToFile(lcDestination + ".jpg","image/jpeg", "quality=70")