04-30-2006, 09:15 PM
I have an image on my form (form1), how can I save it to a file?
What is the best format for an image that you don't want to compress or alter the pixels in saving?
04-30-2006, 10:23 PM
If you don't want compression, save it as a bitmap. If you want a good compression/quality ratio use PNG.
05-01-2006, 02:14 AM
Okay, but how do I tell the program to save the Form1 image?
So far I have "Dim IMG as bitmap" and "IMG.Save(TEXT2.TEXT)"
But this program has no idea where it's image is coming from.
05-01-2006, 04:53 PM
Forms don't have images - images have images. If you were unfortunate to be drawing onto a form, you should be drawing to a Bitmap if you want to save.
In which case, to draw to a Bitmap, you get a Graphics object like
bmp = New Bitmap(xx, yy)
GFX = Graphics.FromImage(bmp)
05-10-2006, 12:35 AM
How can I convert a form image to a bitmap?
05-10-2006, 04:31 AM
Where is the image? I'm guessing it is the property of some control, so:
Shaul meant save as BMP for no compression (bmp is the "bitmap file format").
05-17-2006, 06:04 PM
If you have drawn an image directly to the form, there is a method built into controls called DrawToBitmap(). I imagine it would be something like:
Dim b as new bitmap(myform.width,myform.height)