I am developing a web app so students in schools can control our robots remotely.
I am trying to show pictures using webimageview.
I finally figured out how to size it to the screen with help from the forum, but the picture is washed out. It is very light colored. I have tried changing the dimensions of the original picture.
Any ideas?
The picture is stored in the project in the images folder
I resize the picture in the resized event, where sw and sh are the size of the browser window.
WelcomeScreen.Picture = reSizeToFit(welcomeimage,sw,sh)
which calls this subroutine:
reSizeToFit(imagetodraw as picture, maxWidth as integer, maxHeight as integer)
dim ratio as Double = min( maxHeight/imagetodraw.Height, maxWidth/imagetodraw.Width)
dim newPic as new Picture( imagetodraw.width * ratio, imagetodraw.height * ratio )
newPic.graphics.DrawPicture( imagetodraw, 0, 0, newPic.width, newPic.height, 0, 0, imagetodraw.width,imagetodraw.height)
return newPic