|
-
Aug 24th, 2001, 07:43 AM
#1
Thread Starter
New Member
a question zoom out a picture
I try to zoom out a picture in a picturebox using stretchblt API or paintpicture method , it 's normal working when the picture's width/height under about 6000 pixels, but if over that size, the picturebox will be filled in backcolour, any image date lost.
for example: i try to zoom out a picture (size =800x600) to 800%,
that error is occured and speed of zoom is very slow.
A famous software named ACDSEE is so good do that job, and speed of zoom is big faster than my program.
does anybody know how to solve that problem? pls give me a hand.
-
Aug 24th, 2001, 11:20 AM
#2
ill get back to u
i have the code someware, just give me a few days (remind me if i forget)
-
Aug 24th, 2001, 12:03 PM
#3
Frenzied Member
you could create more than one picturebox and split the original picture over them with your strectchblt
Sanity is a full time job
Puh das war harter Stoff!
-
Aug 27th, 2001, 12:25 PM
#4
stretching
yes that was what i was going to suggest but perhaps the image can be changed using:
Private Sub hsbWidth_Change()
imgPic.Width = hsbWidth.Value
End Sub
Private Sub hsbHeight_Change()
imgPic.Height = hsbHeight.Value
End Sub
Or if you want you could have a value set at the start of the project and use buttons:
Private Sub ZoomAdd_Click()
Zoom = Zoom + 10
imgPic.Width = imgPic.Width + Zoom
imgPic.height = imgPic.Height + Zoom
End Sub
Private Sub ZoomOut_Click()
Zoom = Zoom - 10
imgPic.Width = imgPic.Width - Zoom
imgPic.height = imgPic.Height - Zoom
End Sub
Havent tested this so be warned
-
Aug 27th, 2001, 12:34 PM
#5
Frenzied Member
Hum, why do you wanna make such a big image even bigger?
-
Aug 27th, 2001, 12:41 PM
#6
bigger
if yyou zoom out dosnt the pic get smaller!
-
Aug 27th, 2001, 01:05 PM
#7
Frenzied Member
Hey Techi
I think your code is a little wrong.
If you add like 5 times and than you substract one time you wouldn't get the same result as if you would have pressed add 4 times, but the result of pressing 4 times substract.
You would need to set the zoom variable to 0 before adding or substracting those 10.
Sanity is a full time job
Puh das war harter Stoff!
-
Aug 27th, 2001, 01:28 PM
#8
oh year!
I have just started looking in to the simplest pure vb way into solving this problem without trying to ues api, DX or Active X controls.
-
Aug 28th, 2001, 10:00 AM
#9
Frenzied Member
Why don't you wanna use that kind of stuff? It'll work on everyone's computer and the web is full of wrapper modules or DLLs to make its use even easier
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
|