English > Feature Suggestions
Image scaling/resize quality
mgpw4me@yahoo.com:
The issue is more obvious with people images than posters.
Here I go with assumptions (again) since I can only guess at the code being used. If the Delphi image control is being used, and the stretch property is set TRUE, I'd assume (ugh) the StretchBlt Windows function is being used for image scaling. This is a 'fast & dirty' scaling function that I've seen in action myself, with the same results as PVD...not 'special'.
My solution was to write a matrix scaling routine, but in real time, this would not be reasonable. Further research turned up this C++ code:
http://www.ucancode.net/faq/Draw-Image-StretchBlt-Dib-VC.htm
[attachment deleted by admin]
nostra:
I use the Graphics32 components and I do have many different algorithms for resizing images. I thought I have chosen the one with the best quality/speed... I could make some tests and pick the sharper one when I have nothing else to do.
rick.ca:
--- Quote from: mgpw4me@yahoo.com on May 06, 2010, 01:09:18 am ---Here I go with assumptions (again)...
--- End quote ---
That control turned my image into a newt! ;D
mgpw4me@yahoo.com:
Any image scaling that involves averaging will cause blurring, while anything that selects the 'closest color' will create aliasing (the 'step effect' you get on diagonal lines), so I don't doubt the 'best' algorithm is already being used, given that the best method will change based on the image being scaled. Blurring is less noticeable than jagged edges.
A light sharpen on images that are downsized (and not others) might be a better use of time than hunting for a better scaling method.
Hyomil:
--- Quote from: mgpw4me@yahoo.com on May 07, 2010, 03:00:41 pm ---A light sharpen on images that are downsized (and not others) might be a better use of time than hunting for a better scaling method.
--- End quote ---
I'm familiar with the general advice to lightly sharpen images after resizing them, but I often don't take the trouble to do it since the difference is so slight when using the more computationally intensive algorithms like Bicubic or Lanczos. With the PrintScreen cap from PVD, though, using an Unsharp Mask filter on it really made it virtually indistinguishable from the version that was resized with Bicubic in Photoshop. Maybe that would be a good solution if it didn't slow things down too much for users with slower computers. Original image I posted is attached with the Bicubic resize still on the left but the PVD cap on the right sharpened with Unsharp Mask (Amount 44%, Radius 1.0). (It actually looks minutely better now than the Bicubic version, but if you gave that version an appropriate amount of sharpening, I'm sure they'd be the same.)
[attachment deleted by admin]
Navigation
[0] Message Index
[*] Previous page
Go to full version