Como guardar a disco (en lo posible en el equipo cliente y no server) una imagen contenida en un WebImageView.
He intentado con el siguiente código y si bien no me da error, no encuentro el archivo.
Var source As Picture = ImageView2.Picture
//Var wp As WebPicture = source //al final no necesite usarlo
Var strFileName as string = “prueba.png”
Var imageData As String
Var bs As BinaryStream
Var f As FolderItem
f = GetFolderItem(“comprobantes”)
f = f.Child(strFileName)
// son las 2 lineas de arriba o la de abajo, segun la carpeta
// f = SpecialFolder.Temporary.Child(strFileName)
If ImageView2.Picture <> Nil Then
If source.IsExportFormatSupported(Picture.Formats.PNG) Then
// Save the image out to the file
source.Save(f, Picture.SaveAsPNG)
// se puede abrir una URL con el archivo descargado?! ShowURL f.URLPath
End If
// Open the file as a BinaryStream and read the data in
'bs = BinaryStream.Open(f, False)
'If bs <> Nil Then
'imageData = bs.Read(bs.Length)
'bs.Close
'End If
// delete the temporary file if it exists
'If f.Exists Then
'f.Delete
'End If
else
msgbox “no hay imagen”
End If
Desde ya muchas gracias!