|
-
Nov 6th, 2002, 09:33 PM
#1
Thread Starter
Fanatic Member
Alternative method to save pictures besides using SavePicture.
Ok, I have a problem. If I use the SavePicture statement to save a picture in a picturebox, some parts get cut off when the picture dimension is greater than the picturebox's dimension.
Is there an alternative way to save a picture in a picturebox without getting parts of the picture cut off? If there is, please tell me.
Thanks in advance.
-
Nov 6th, 2002, 11:39 PM
#2
So Unbanned
You could resize the picture box before saving.
Or you could create a DC for it, then copy the picture to the DC, then save the DC.
-
Nov 7th, 2002, 01:52 AM
#3
Thread Starter
Fanatic Member
Ehh... would you mind telling me how to do that?
-
Nov 7th, 2002, 12:53 PM
#4
Thread Starter
Fanatic Member
-
Nov 7th, 2002, 12:57 PM
#5
So Unbanned
Oh boy.
Lets see.
Try this:
VB Code:
Picture1.picture = Picture1.Image
savepicture Picture1.picture
-
Nov 7th, 2002, 12:59 PM
#6
So Unbanned
you need to put a path after the savepicture picture1.picture, "c:\path\pic.bmp"
like that
-
Nov 7th, 2002, 01:01 PM
#7
Thread Starter
Fanatic Member
Originally posted by DiGiTaIErRoR
Oh boy.
Lets see.
Try this:
VB Code:
Picture1.picture = Picture1.Image
savepicture Picture1.picture
The picture still gets cut off 
Originally posted by DiGiTaIErRoR
you need to put a path after the savepicture picture1.picture, "c:\path\pic.bmp"
like that
Yea I just now noticed that.
-
Nov 7th, 2002, 01:02 PM
#8
So Unbanned
Try this:
VB Code:
Picture1.AutoSize = true
picture1.picture = picture1.image
savepicture picture1.picture, "c:\pic.bmp"
-
Nov 7th, 2002, 01:05 PM
#9
Thread Starter
Fanatic Member
nope
-
Nov 7th, 2002, 01:10 PM
#10
So Unbanned
You're going to have to make the picturebox as big as the picture is.
-
Nov 7th, 2002, 01:12 PM
#11
Thread Starter
Fanatic Member
Ok I'll try whatever to get it working.
Thanks anyways. 
Edit: If anyone could still help me please do.
-
Nov 7th, 2002, 01:15 PM
#12
So Unbanned
Well, here's your problem.
The Image contains the viewable content, the picture contains all persistent content.
So, if you make changes to a picture, you'll have to have it full-size before you set the .Image to the .Picture.
-
Nov 7th, 2002, 01:27 PM
#13
Thread Starter
Fanatic Member
Originally posted by DiGiTaIErRoR
Well, here's your problem.
The Image contains the viewable content, the picture contains all persistent content.
So, if you make changes to a picture, you'll have to have it full-size before you set the .Image to the .Picture.
Well I was asking if there's a way to save a picture in a diff. way other than SavePicture.
-
Nov 7th, 2002, 01:59 PM
#14
So Unbanned
You could write raw data, but you still cannot get pixels that are off the DC, which is the same as the image.
The only way to do that would be to create a DIB before hand.
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
|