get pixel width / height of an image file...

bohemian.surrealist@gmail.com's icon

Hey folks,

Anybody know a good way to get Max/Jitter to figure out what an image file's dimensions are? I want to have the user select his or her picture, but I want to make sure that the dimensions of the image are between certain width and height values.

Any thoughts?

Thanks!
Drew

Rob Ramirez's icon

many ways. you could use java/javascript image libraries to do this, or just load into jit.matrix @adapt 1, and query the dim attribute after loading.

bohemian.surrealist@gmail.com's icon

Thank you! adapt 1 is perfect.

Peace,
Drew