>>>PNG is usually smaller. JPG is also smaller than BMP.
>>
>>Thank you. I will have to check with the customer if he knows how to get his signature into a PNG file.
>
>PNG is similar to GIF and it's usually bigger than JPG.
Dmitry,
For the smallest size possible, in your case, a signature can saved in a MONOCHROME BMP, that means that you have to save it using the BMP encoder, set to 1bpp - one bit per pixel.
That means that each pixel will consume ONLY 1 BIT !!!!
That's indeed the biggest economy of space that you can have.
GIFs are also indexed images, and you can also save it as a GIF, set to 1bpp, but it is not that common.
If your scanner software does not offer the 1bpp BMP file saving, just save it to any kind of BMP format available, then use GdiPlusX to convert ir to BMP, and obtain the smallest image possible:
If you are interested in doing this, feel free to call me again for this conversion...
Basically you';ll need to add ALL these lines of code:
DO LOCFILE("System.App")
WITH _SCREEN.System.Drawing
LOCAL loOriginalBmp AS xfcBitmap
loOriginalBmp = .Bitmap.New(GETPICT())
LOCAL loMonoChrBmp as xfcBitmap
loMonoChrBmp = loOriginalBmp.GetMonochrome()
loMonoChrBmp.Save("c:\Monochromatic.bmp", .Imaging.ImageFormat.Bmp)
ENDWITH
RETURN
More info and other possible variations here:
http://weblogs.foxite.com/vfpimaging/archive/2007/05/26/3857.aspxHope this helps !
REgards
Cesar