How can I determine client image parameters using javascript

I want to check the download of image files on the client side. T here will also be a server side check that is already working with the image mask.

I want to reproduce this on the client side before downloading (since the files will be quite large and the preconditions for image files are very limited, this can save the user a lot of pain if checking is done in the browser before the download process)

Allowed Files:

  • Jpeg

  • EPS

  • Tiff

I need to detect:

  • Color Space (CMYK / RGB)

  • Size (width x height) // this simple one is in JPEG, but what about TIFF and EPS?

  • Resolution (dpi)

The main problem is detecting color space and processing formats other than JPG. Is there something like ImageMagick to "identify" for javascript or do you have other ideas ...?!

+7
javascript validation
source share
1 answer

Take a look. It uses the HTML5 APIs, but it looks the way you are looking.

0
source share

All Articles