|
-
May 30th, 2001, 01:31 PM
#1
Thread Starter
Hyperactive Member
Creating GIF or BMPs
Anyway to Create A GIF file or A BMP file from VB. I have a series of points and I want to create an image ploting those Points.
-
May 30th, 2001, 01:39 PM
#2
Consider plotting the points or whatever to a control like MSChart. Then use the BitBlt api to move the working area of the chart to a Picture box. Next, SavePicture Picture1.Picture "c:\myfile.bmp"
For GIF format you will have to use an ImgEdit control instead of a picturebox and use the SaveAs method.
-
May 30th, 2001, 01:40 PM
#3
Hyperactive Member
Bitmap - Yes
Gif - No (sort of)
You can use this simple routine to save a bitmap image from a control like a picturebox:
Code:
'in this case picture1 is a picturebox. By the way,
'even if you try to put an extension as .gif the format
'will still be in bitmap format.
savepicture picture1.image, "C:\mydir\myfile.bmp"
I don't know of a way to save a gif through VB code...however if you look at planetsourcecode there are a couple utilities that will allow you to -convert- a bitmap to jpeg or gif format. The best one I know of is PicFormat32a
-
May 30th, 2001, 01:43 PM
#4
Thread Starter
Hyperactive Member
ok I think it is my fault I forgot to specify , I am not going to be able to use any ActiveX controls so , No Charts , No Image Comtrols , Basically I am operating from a COM object.
-
May 30th, 2001, 04:49 PM
#5
Thread Starter
Hyperactive Member
Huston .. we have a problem ... when I used StretchBlt to transfer the image from the Chart to a picture control ... I used saveimage ... but all it shows when I open the file is just gray backgroud as if no chart was there ...
-
May 30th, 2001, 06:02 PM
#6
Member
turn autoredraw on in properties
Make sure any of the transparent fonts are turned off in properties of picturebox. Also, set autoredraw ON.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|