Hi All, First of all, love the control, easy to use.
What im using the library for is to take a image the User supplies through a OpenFileDialog than shrink it to 100 * 100 and upload it to the web server. Here is my code:
I throw up an openfiledialog and user selects the image......
Dim stream As System.IO.Stream = dlg.File.OpenRead()
Dim imageData As New ImageTools.Image
imageData = ImageTools.Image.Resize(imageData, 50, 50)
Dim enc As New ImageTools.IO.Png.PngEncoder()
Dim pngStream As New MemoryStream()
pngStream.Position = 0
Dim reader2 As New System.IO.BinaryReader(pngStream)
Dim x As uploadService.uploadServiceSoapClient = New uploadService.uploadServiceSoapClient
AddHandler x.UploadFilesCompleted, AddressOf UploadFileComplted
x.UploadFilesAsync(dlg.File.Name, reader2.ReadBytes(pngStream.Length), 1)
I just have two issues.
1. When I select a large image 1 meg > I get an error on the imageData.SetSource line saying "Specified Method is not Supported". Smaller images work fine.
2. The image that gets uploaded to the server seems to not have copied the colour of the original image correctly. The colours are faded and the whole image has a white tindge to it.
Look forward to hearing back from you.