|
-
Mar 5th, 2001, 03:33 AM
#1
Thread Starter
Lively Member
Can't use SavePicture to save as BMP...
Ok, I used the paintpicture to resize my pic. But I can't
save it? Not even when using savepicture to save it
as .BMP?
I have loaded a picture in picture1 and want it resized
into picture2. This works and it shows up fine. But then
if I try to copy picture2.picture to a new picturebox
picture3.picture (this was just to test) nothing shows
up? Also When I try to save the picture in picture2 with
the savepicture command I get this error :
"Run-time error(380) Invalid property value"
and it points to the savepicture code thingy. Is this
because there is no info to in picture2 to save or what?
I guess that would be the reason, but then I don't
understand. Cause it shows the picture in picture2
perfectly?? Well... if anyone can help, that would be
greatly appreciated.
Here's the code that resizes the picture in picture1 and
copies the resized picture into picture2:
Private Sub command1_click()
Picture2.PaintPicture Picture1.Picture, 0, 0, 1400, 700
With Picture2
.Height = Picture1.Height
.Width = Picture1.Width
End With
End Sub
Here's the button I use to save the picture :
Private Sub command2_click()
SavePicture Picture2.Picture, "c:\test2.jpg"
End Sub
-Zen
Last edited by ZenMan; Mar 5th, 2001 at 07:22 AM.
-
Mar 5th, 2001, 08:28 AM
#2
Fanatic Member
The picture property doesn't contain anything, since you didn't use Picture2.Picture = Picture1.Picture, but the PaintPicture method.
Try using Picture2.Image with the SavePicture...
-
Mar 5th, 2001, 08:52 AM
#3
Thread Starter
Lively Member
That isn't working either. That only reults in a BMP
image that is entirely gray. I'm stuck....
More help please
-
Mar 5th, 2001, 11:30 AM
#4
transcendental analytic
Save the image property instead and make sure autoredraw is set to true
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Mar 5th, 2001, 05:36 PM
#5
Thread Starter
Lively Member
Yepp, just needed to set the autoredraw to true
Thanks a lot for all the help!
-Zen
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
|