On Tuesday, July 29, 2014 02:30:55 PM Andrei Zh wrote:
> There's pretty cool package "Images" by Tim Holy (kudos, Tim!), 

...and Ron, Kevin, Lucas, etc ...

> but it
> seems to leak one standard and pretty helpful function - resizing image to
> specific size.
> There's "restrict" method (probably imported from Grid.jl),
> but it only reduces image size by 2 at each dimension. Are there any other
> options that work with arbitrary images sizes?

Yeah, it's a pretty obvious omission, but to be truthful it's never come up 
for me so I've never implemented it. I will get to it eventually, but in the 
meantime if you need it soon it might be worth considering putting something 
together yourself. If you use Grid to do it (+ smoothing with imfilter or 
imfilter_gaussian if you're downsizing and don't want aliasing), it shouldn't 
be more than 20 lines or so. But there are other approaches, see 
http://stackoverflow.com/questions/384991/what-is-the-best-image-downscaling-algorithm-quality-wise
which might involve more effort but also yield higher quality/speed.

BTW, the version of restrict in Images is actually considerably faster than 
the one in Grid. Sometime I plan to implement what should be an even faster 
version and put it back into Grid, but I haven't gotten around to it.

--Tim

Reply via email to