Doe anyone have an implementation of a image size reduction method that will produce smooth size changes.
I have some 512x512 images that need to be reduced to 40x40 (amongst other sizes)
there is a website that will do this (and does a great job), but there is some pre/post image processing that I want to do, not to mention I have to process images one at a time, and would like to do bulk.
Using g.DrawPicture original,0,0,newsize,newsize, 0,0,original.width,original.height produces jagged results
One option that is still pretty fast executing is do the scaling in two stages. You’ll get less sharp results, but execution speed will still be OK compared to pixel wise manipulation. The two stages forces subsampling to occur at two frequencies and “smooths” the result. That’s assuming the targetOS is not doing nearest neighbor scaling.
I have tried various options such as the one you suggested and none match what the website I found can do…
It produces great results… for me speed is not an issue, but results are
yup… would rather implement the Lanczos or similar directly…
not in a postion to pay for add-ons, plus I have a fundamental problem with plug-ins (which I have mentioned in the past )
[quote=390939:@Jared Feder]You can give this declare a try.
I have used it in the past when downscaling an image on a canvas caused it to appear very jagged.
declare sub CGContextSetInterpolationQuality lib "Cocoa" ( context as integer, quality as integer )
CGContextSetInterpolationQuality( g.handle( g.HandleTypeCGContextRef ), 3)[/quote]
That produced results IDENTICAL to website software I was using… Perfect… thanks