|
-
Apr 16th, 2000, 03:12 PM
#1
Thread Starter
New Member
hi, everybody:
How can I save a modified Pic.Pset to a .BMP file ?
below is my source code,I get RGB color from
Picture1 and add 10 to the RGB value,then Pset Picture2.
Then I use SavePicture to get modifid Picture2.image saved.
But I can not get the modified Picture2 saved. Why?
Note: the picture1 is 256 gray scale in 277*221
Private Sub Command1_Click()
For X3 = 0 To 276
For Y3 = 0 To 220
gray_scale0 = "&H" + Mid$(Hex$(Picture1.Point(X3, y3)),1, 1)
gray_scale1 = "&H" + Mid$(Hex$(Picture1.Point(X3, Y3)), 2, 1)
R_color = Val(gray_scale0) * 16 + Val(gray_scale1)+10
Picture2.PSet (X3, Y3), RGB(R_color, R_color, R_color)
Next
Next
pic_name = "tst.bmp"
Call SavePicture(Picture2.Image, pic_name)
End Sub
[Edited by vov on 04-17-2000 at 07:30 AM]
-
Apr 16th, 2000, 11:11 PM
#2
Frenzied Member
Try Changing the pictureboxes autoredraw property, I think it needs to be set to true.
-
Apr 17th, 2000, 12:17 AM
#3
transcendental analytic
put the image property to the picture property and save the picture property
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.
-
Apr 17th, 2000, 02:23 PM
#4
Thread Starter
New Member
I have tried the Picture2.AutoRedraw = True or Picture2.Picture = Picture2.Image. And save Picture2.Picture. But that
still doesn't wrok. It just save a PIC filled with background color. Where do I put the AutoRedraw?
Thanks a lot.
-
Apr 17th, 2000, 07:21 PM
#5
transcendental analytic
Well set the autoredraw in design mode and use object.refresh to update the control you're drawing to.
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.
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
|