Last change
on this file since 6a3a178 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
289 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | function isPSD (buffer) {
|
---|
4 | return ('8BPS' === buffer.toString('ascii', 0, 4));
|
---|
5 | }
|
---|
6 |
|
---|
7 | function calculate (buffer) {
|
---|
8 | return {
|
---|
9 | 'width': buffer.readUInt32BE(18),
|
---|
10 | 'height': buffer.readUInt32BE(14)
|
---|
11 | };
|
---|
12 | }
|
---|
13 |
|
---|
14 | module.exports = {
|
---|
15 | 'detect': isPSD,
|
---|
16 | 'calculate': calculate
|
---|
17 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.