imagelib.imageDimension.js 422 B

12345678910111213
  1. console.log("Image Properties Access Test");
  2. //To test this, put a test.jpg on your desktop
  3. var imagePath = "user:/Desktop/test.jpeg";
  4. //Require the image library
  5. var loaded = requirelib("imagelib");
  6. if (loaded) {
  7. //Library loaded. Call to the functions
  8. var dimension = imagelib.getImageDimension(imagePath);
  9. sendJSONResp(JSON.stringify(dimension));
  10. } else {
  11. console.log("Failed to load lib: imagelib");
  12. }