5e72d246a914edd8daf6137135346f8ca12fb485c85da0cb563085d816831f716e9b699f1d5a9e948a54b0ffac52b4204fc60c898442f1e6cdd77b38dd6b19 289 B

1234567891011121314151617
  1. 'use strict';
  2. function isPSD (buffer) {
  3. return ('8BPS' === buffer.toString('ascii', 0, 4));
  4. }
  5. function calculate (buffer) {
  6. return {
  7. 'width': buffer.readUInt32BE(18),
  8. 'height': buffer.readUInt32BE(14)
  9. };
  10. }
  11. module.exports = {
  12. 'detect': isPSD,
  13. 'calculate': calculate
  14. };