A few image utils for in browser JavaScript