3 ms·
Why not just do the interpolation client-side?
by iso8859-1 14y ago
Why not just do the interpolation client-side?
- coldtea 14y agoWhat would be the reason? To hog our browser? Besides, server side he has access to powerful smart resizing programs and algorithms. Client size, not so much.
- iso8859-1 14y agoI wasn't considering "smart" interpolation methods, I was assuming the best available interpolation was already implemented in Chrome. I think it would load faster with client-side interpolation actually, 17 MB takes a long time on most connections. But I don't see why client-side can't do "powerful resizing". Not since <canvas> appeared, anyway.
- coldtea 14y ago>I think it would load faster with client-side interpolation actually, 17 MB takes a long time on most connections. You'd still have to move the 5-6 MB original, and then it would hog a lot of people's browsers to work on the image in the canvas (depending on client CPU/memory). >But I don't see why client-side can't do "powerful resizing". Not since <canvas> appeared, anyway. Who said it cannot do? I said the options aren't available. The guy did a simple resize. Should he also spend hours coding smart interpolation on javascript instead of just putting the image up? For most connections, a 17MB download is eaten for breakfast, anyway.
- peripetylabs 14y agoI should have mentioned this was done client-side, by a Python script: http://code.google.com/p/fftresize/source/browse/fftresize.py http://code.google.com/p/fftresize/source/browse/fftresize.p... Like so (edit: note that you'll have to edit the image first to make it grayscale, and even then this uses a lot of memory...): $ python fftresize.py suspect-number-2.JPG 2.0 I just uploaded the image to S3 to share. The script isn't great (grayscale only) because it was written for a blog post to demonstrate the interpolation method, but I might as well work on it this weekend.