#3 poor image quality

closed
None
5
2008-12-15
2008-11-06
rjshelq652
No

This is a great idea! But the quality of the images is quite terrible.

Using either Photoshop (at quality 75) or Canon's ZoomBrowser software (at quality medium), resizing a 3264 x 2448 image to 800x 600 still looks very good and uses about 270 to 300 kB.

However, using your powertoy clone, the image is terrible, with grain, noise and "sparkles" all over. The image quality is really quite unusable.

Even at 1024 x 768 the image from your program is still very poor, with excessive noise and "sparkles" all over.

How about increasing the image quality, or at least providing some sort of .ini file, where the user can select better quality?

Discussion

  • rjshelq652

    rjshelq652 - 2008-11-06

    P.S...

    I'm not a programmer, and don't want to be, but it appears to me that the root of the image quality problem is that you are currently using the bitmap image drawing class, which does not offer methods such as setting the interpolation method and setting the image quality.

    If you would use a more appropriate class such as GDI+ to write PhotoResizer.cs , then you could use high quality bicubic interpolation and high image quality settings. With such improvements, this could be a very, very popular project!

    See for example:

    codeproject.com/KB/GDI-plus/imageresize.aspx

     
  • rjshelq652

    rjshelq652 - 2008-11-06

    another P.S.

    The GenerateThumbNail function at:

    eggheadcafe.com/articles/20030515.asp

    shows use of CompositingQuality.HighQuality, SmoothingMode.HighQuality, and InterpolationMode.HighQualityBicubic which would also seem able to solve the image quality problems.

     
  • Brice Lambson

    Brice Lambson - 2008-11-06
    • assigned_to: nobody --> bricelambson
     
  • Brice Lambson

    Brice Lambson - 2008-11-06

    Thank you for the feedback. I've never tested it with an image that big and had no idea the quality was so bad. I initially looked into using the high quality settings, but when I tested it, the defaults seemed to suffice. However, since this is the second time I've received a quality-related request, I will make the changes. You can expect a new release soon.

    I have a few responses in regard to your comments:
    1. .ini files are so 1990s... I would use an XML config file.
    2. SmoothingMode only affects the drawing of lines, curves, and filled areas.
    3. The Bitmap class represents any GDI+ raster image and should not be confused with the .bmp image format.
    4. The statistics page says this project already is popular, but we'll see if your requested changes can push it to "very popular" ;P

    Also, I wanted to thank you for your enthusiasm; it's cool when users are proactive in making the product better.

    Cheers.

     
  • rjshelq652

    rjshelq652 - 2008-11-06

    Please forgive me for my programming ignorance, but I'm very happy that you've responded so promptly and favorably.

    I'd be happy to help with any beta testing.

     
  • rjshelq652

    rjshelq652 - 2008-11-06

    more food for thought:

    glennjones.net/Post/799/Highqualitydynamicallyresizedimageswithnet.htm

    geekpedia.com/code7_Method-for-resizing-pictures-with-aspect-ratio.html

     
  • Brice Lambson

    Brice Lambson - 2008-11-06

    The changes have been made. I hope it's sufficient because it's the best .NET has to offer (without going to third-party offerings). You can download the new release (1.1) from the download page.

     
  • Brice Lambson

    Brice Lambson - 2008-11-06
    • status: open --> closed
     
  • rjshelq652

    rjshelq652 - 2008-11-06

    Thank you Brice! The new 1.1 is MUCH better, but still not as good as Photoshop.

    The place where I still notice a big difference is along the edges of things. With your 1.1 version I see jagged edges, while in Photoshop the edges have obvious anti-aliasing which smooths the jagged edges.

    How about adding the SmoothingMode.HighQuality to see if that will apply some anti-aliasing to the edges (which amount to being lines drawn in the image)?? If it works, then your images will be as good as photoshop.. and that's a pretty high standard.

    I know you mentioned earlier that smoothing is only for lines... but when the image is being redrawn, the sharp edges are in fact like lines. At best it will help to reduce the jagged edges, at worst it will do nothing. So it seems like a pretty safe test.

     
  • rjshelq652

    rjshelq652 - 2008-11-06
    • status: closed --> open
     
  • Brice Lambson

    Brice Lambson - 2008-11-06

    lol, it's Microsoft .NET -- a general purpose application development framework -- not Photoshop.

    I expect the problem is that .NET puts everything on a black background, and if you use a lighter-colored image, the black bleeds over. Fixing this would require analizing the image to determin what background color to use, but this is completely out of scope.

    Could you attach (or link to) a file that I could use to test this? Also tell me what size you're resizing it to. I doubt there is much I can do to fix this, but get me the info and I'll play around with it to see what I come up with.

     
  • Brice Lambson

    Brice Lambson - 2008-11-06
    • status: open --> pending
     
  • rjshelq652

    rjshelq652 - 2008-11-06

    How about just amusing me and tossing in the SmoothingMode.HighQuality ? It doesn't cost anything.. and at best it fixes what I'm seeing, at worst it does nothing.

    Your 1.1 is a great improvement, and with a bit of smoothing it WILL in fact be as good as Photoshop.

    In the spirit of testing I am using numerous photos and testing them all at both 800x600 and 1024x768. Yes, I could send you photos, but results are all in the eye of the beholder... I can readily see these little differences. So why not continue to use your programming skills and my eye??

     
  • Brice Lambson

    Brice Lambson - 2008-11-06

    Added PixelOffsetMode.HighQuality and SmoothingMode.HighQuality.

     
  • Brice Lambson

    Brice Lambson - 2008-11-06

    Attached. Without a Setup, you'll have to use the ugly/alternate UI to test it.
    File Added: ImageResizer-2227464.zip

     
  • rjshelq652

    rjshelq652 - 2008-11-06

    Thanks Brice.

    Sadly, the images made with version 1.1 and with the zip exe/dll files (both timestamped 1:56PM) are identical.

    Oh well, thanks for humoring me!

    If you happen to stumble on any more ideas, I've saved all of the versions of the test images and will be happy to help evaluate any further improvements.

    For images which have fine, complex backgrounds (such as jungle foilage), the improvement has been HUGE from version 1.0 to 1.1.

    Thanks for the great program!

     
  • Brice Lambson

    Brice Lambson - 2008-11-06
    • status: pending --> closed
     
  • Brice Lambson

    Brice Lambson - 2008-11-06

    Thanks for the great request. I agree, the quality is loads better. I am closing this item now then.

     
  • rjshelq652

    rjshelq652 - 2008-11-06
    • status: closed --> open
     
  • rjshelq652

    rjshelq652 - 2008-11-06

    One closing comment:

    I've been comparing four different resizing programs at 800x600 and at 1024x768 (from original digital photos at 3264x2448), and on test after test the results that I consistently get are:

    4th place: your version 1.0 clone
    3rd place: Original Microsoft XP PowerToy
    2nd place: your version 1.1 clone
    best: Photoshop, quality 60 (which is medium quality)

    So... you're now better than the software which you set out to clone!

     
  • Brice Lambson

    Brice Lambson - 2008-11-06
    • status: open --> closed
     
  • rjshelq652

    rjshelq652 - 2008-11-07
    • status: closed --> open
     
  • rjshelq652

    rjshelq652 - 2008-11-07

    Have you considered using the newer WPF rather than the old GDI+? It appears that WPF may include more sophisticated image processing, allowing quality factors from 1 (poor) to 100 (high) to be employed.

    Perhaps revising PhotoResizer to use WPF might be another quantum leap.

    see for example:

    www.odewit.net/ArticleContent.aspx?id=WpfImageToJpeg&format=html

     
  • Brice Lambson

    Brice Lambson - 2008-12-15
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks