daveford123
asked on
VB.NET Picturebox Blurring Smaller Images
Hi Experts,
I'm developing a graphical processing package in (possibly the worst language for this!!) VB.NET, and part of this involves me showing a small 10x10 or 50x50 pixel image in a large picturebox. The VB.NET control is blurring the image, making it impossible to distinguish between the pixels. The picturebox is on 'Stretch' mode, in order to bring the pixels to a viewable level.
If any experts know how to either change the properties of the picture box, or how to scale up the image without using get/setpixel as this is too slow for my application then i would be most appreciative.
Tom
I'm developing a graphical processing package in (possibly the worst language for this!!) VB.NET, and part of this involves me showing a small 10x10 or 50x50 pixel image in a large picturebox. The VB.NET control is blurring the image, making it impossible to distinguish between the pixels. The picturebox is on 'Stretch' mode, in order to bring the pixels to a viewable level.
If any experts know how to either change the properties of the picture box, or how to scale up the image without using get/setpixel as this is too slow for my application then i would be most appreciative.
Tom
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Rachitkohli, That site is just what im looking for, with the translation matrix(es). the only issue im having now is changing the graphics object into the image data type that the picturebox can display. Any ideas?
ASKER
Thought this might help; this is the code im using currently, and getting a 'generic error'. Previously i was using the commented code and getting a 'type mismatch' error.
Dim e As Graphics
e = Graphics.FromImage(TempImg)
e.Transform = New Drawing2D.Matrix(50, 0, 0, 50, 0, 0)
COMP_TRANS.Image = e
COMP_TRANS.Image = Image.FromHbitmap(e.GetHdc)
ASKER
Cheers for that - good site, good advice
http://bobpowell.net/