This project is read-only.

Large Jpeg and Quality Issue

Dec 17, 2009 at 12:02 AM

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()
            enc.Encode(imageData, pngStream)

            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)

<font size="2">





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.



Dec 30, 2009 at 9:16 PM

Hi All, Is anyone out there that can shed some light on this subject??


Dec 31, 2009 at 1:10 AM


sorry, but I am in vacation in costa rica at the moment and dont have the time and tools to help you. It sounds like that you use a old version (the release). I recommend to download the latest source and compile it. The bugs should be fixed.

I am going to prepare a new release when I am back.