Picture scale and upload

I would like to use the code below to upload an image with fileloader and display it directly in the Imageviewer without saving the image on the server.

Although the picture is displayed, it is not scaled, but cropped without scaling. What is the easiest way to scale the image for existing image viewers?

Besides, image is also saved in project folder when I run webapp. If I stop run, the pictures are deleted again. Do I have to remove the pictures there Manuel?

Var outputFile As FolderItem
Var p1 as Picture
Var p2 as new Picture(369,800)

For Each file As WebUploadedFile In files
Try
outputFile = New FolderItem(file.Name)

p1 = Picture.FromData(file.Data)
p2.graphics.drawpicture(p1,0,0,369,800,0,0,739,1600)

ImageViewer1.Picture = p2

Catch e As IOException
Continue
End Try
Next

it works so
p2.Graphics.DrawPicture(p1,0,0,ImageViewer1.width, ImageViewer1.Height,0,0,p1.width, p1.height)