> term% time resample -x 1600 -y 1200 glenda.pic >/dev/null
> 36.07u 0.01s 36.21r    resample -x 1600 -y 1200 ...
> term% time resize -b -s 1600 1200 glenda.pic >/dev/null
> 0.91u 0.02s 1.06r      resize -b -s 1600 1200 ...
> 
> The -b option is for bilinear interpolation.  Without that, it goes
> a bit faster but you get jaggies.
> 
> term% time resize -s 1600 1200 glenda.pic >/dev/null
> 0.56u 0.03s 0.71r      resize -s 1600 1200 glenda.pic ...
> 
> It's in /n/sources/contrib/miller/resize.c

very nice!

i modified resize to accept the same arguments as resample.
it is blistering on my machine.  unfortuntely, jpg still can't
keep up.  

; time jpg -t9 2246.jpg | time resize -bx 500 | page
1.96u 0.08s 2.20r        jpg -t9 2246.jpg
reading through graphics...
0.06u 0.04s 2.36r        resize -bx 500

(a quick test shows that jpg has about the same performance
with p9p and 50% of the ticks are in colormap:1420/62424)

i have been using a script to use resample to convert
pictures as i load them from the camera.  to images the resample
on a core i7 machine can just keep up with the new usb.
(about 4mb/s.  i believe this is limited by the spi-based
media.)

the resampled images can be displaed at >50/s.  it's
amazing how fast plan 9 video is when you don't read
back from the frame buffer.  :-)

- erik

Reply via email to