4 ms·
pretty slick :) I created a client-side image shrinker - demo at http://kimsal.com/shrinker http://kimsal.com/shrinker - github at http://github.com/mgkimsal/
by mgkimsal 16y ago
pretty slick :)
I created a client-side image shrinker - demo at http://kimsal.com/shrinker http://kimsal.com/shrinker - github at http://github.com/mgkimsal/jsclientshrinker http://github.com/mgkimsal/jsclientshrinker Perhaps integrating this functionality for images that are 'too big' (whatever file size you decide) would be a nice enhancement? :)
- Blackymetal 16y agodefinitely i'm gonna try your lib.
- mgkimsal 16y agoCool. Fork on github and send any pull requests. The issues right now are that it only works with ff3 and chrome. I'd have thought safari would work, but it doesn't (didn't for me). Some integrated browser detection to offer transparent reduction for images on compatible browsers would great. Let me know how it works out for you :)
- boltofblue 16y agoI like how it changes the dimension. But converting to PNG is massively increasing the file size? "Original file was: 137724 bytes Transmitted size was: 844176 bytes (due to base64) New file is: 633131 bytes"
- mgkimsal 16y agoIt might be - not sure it's just a PNG issue, or if it's a canvas flaw, or what. The system could ideally check the before/after sizes, and only send the smaller one. Good catch (I think I'd seen that once in testing too).