Saving an image to a new file name

What is the syntax to save an image to a new image filename, like saving the image on the canvas which has been resized to fit the canvas, to a new image?

pic is a Picture already on the canvas

newpic = new picture(canvas1.width,canvas1.height,32)
Dim f as FolderItem
newpic.graphics.DrawPicture (pic,0, 0, canvas1.width, canvas1.height, 0, 0, canvas1.width,canvas1.height)
f=GetFolderitem(“images”).Child(Dragdrop.F_img.text)
newpic.save(f, picture.SaveAsJPEG)

Cannot use “f” since the file does not exist.
F_img.text is the field contents on the dialog for the new file name.

of course you can use “F”… sure it does;t exist… as long as it is not NIL then you are fine
because you are about to create it. so it WILL exist.

Yep, you are right… especially if SOMEONE reads his code correctly. LOL