title: Pure JavaScript image manipulation
body: <p>I have a use case where I want to created (a) a Node application that (b) performs basic image manipulations (PNG resize and crop) but (c) where I cannot have external dependencies like native libraries, GraphicsMagick, ImageMagick, PhantonJS, Inkscape, etc.</p>
  
  <p>It all has to be done in pure JavaScript.</p>
  
  <p>Given how simple the manipulation I want to do is (just PNG resize and crop) this doesn't seem impossible. However, I cannot find a crop/resize library that doesn't ultimately have an external or native dependency.</p>
  
  <p>Does such a genuinely pure JavaScript library exist for crop/resize? How difficult would it be to implement this in pure JavaScript, if I had to do it myself? And where should I start?</p>
  
  <p>Alternatively, is there a suitable C function for this that I could compile using emscripten, for example?</p>