From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <9670ac1dfa9616d21c1f65ffc570b369@quanstro.net> From: erik quanstrom Date: Thu, 10 Sep 2009 17:45:57 -0400 To: 9fans@9fans.net In-Reply-To: <9ea8b15ff49a68b8ac5d908202c8757d@hamnavoe.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] nice quote Topicbox-Message-UUID: 6cdd4f88-ead5-11e9-9d60-3106f5b1d025 > 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