Hello. I need to resize a PNG file, keeping its transparent background, in a
web-application.
In the UploadComplete event of a webfileuploader, I have this code, but it
saves a white background png ;(
Where I'm in mistake?
Many thanks
Dim outputFile As FolderItem
Dim output As BinaryStream
dim nomefile,thestring As String
Dim uploadedPicture,ResizedPicture As Picture
For Each file As WebUploadedFile In files
Try
ResizedPicture=picture.ScaleImageAndMaskMBS(Picture.FromData(file.Data),100,100)
thestring=PictureToPNGStringMBS(ResizedPicture)
nomefile="test.png"
outputFile = New FolderItem(MyFolder.child(nomefile))
output = BinaryStream.Create(outputFile, True)
output.Write(thestring)
output.Close
Catch e As IOException
Continue
End Try
Next
------
Sergio Tamborini
Brescia
http://www.system-i.it
"C'è un equivoco di fondo. Si dice che il politico che ha avuto frequentazioni
mafiose, se non viene giudicato colpevole dalla magistratura, è un uomo onesto.
No! La magistratura può fare solo accertamenti di carattere giudiziale. Le
istituzioni hanno il dovere di estromettere gli uomini politici vicini alla
mafia, per essere oneste e apparire tali"
"There is a basic misunderstanding. It is said that political mafia has had
acquaintances, if not found guilty by the courts, is an honest man. No. The
judiciary can only do the findings of a judicial nature. Institutions have a
duty to oust politicians close to the mafia, to be honest, these look "
Paolo Borsellino
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info