Skip to content

Commit d2f3516

Browse files
committed
Remove Node 18 from actions since it does not support CustomEvent.
1 parent 1267691 commit d2f3516

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

.github/workflows/node.js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
node-version: [18.x, 19.x, 20.x, 21.x]
19+
node-version: [19.x, 20.x, 21.x]
2020
# See NodeJS release schedule at https://nodejs.org/en/about/previous-releases.
2121

2222
steps:

README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,11 @@ import { GifParser } from './bitjs/image/parsers/gif.js'
118118

119119
const parser = new GifParser(someArrayBuffer);
120120
parser.onApplicationExtension(evt => {
121-
const appId = evt.applicationExtension.applicationIdentifier;
122-
const appAuthCode = new TextDecoder().decode(
123-
evt.applicationExtension.applicationAuthenticationCode);
121+
const appId = evt.detail.applicationIdentifier;
122+
const appAuthCode = new TextDecoder().decode(evt.detail.applicationAuthenticationCode);
124123
if (appId === 'XMP Data' && appAuthCode === 'XMP') {
125124
/** @type {Uint8Array} */
126-
const appData = evt.applicationExtension.applicationData;
125+
const appData = evt.detail.applicationData;
127126
// Do something with appData (parse the XMP).
128127
}
129128
});
@@ -137,7 +136,19 @@ import { ExifTagNumber } from './bitjs/image/parsers/exif.js';
137136

138137
const parser = new JpegParser(someArrayBuffer);
139138
parser.onApp1Exif(evt => {
140-
console.log(evt.exifValueMap.get(ExifTagNumber.IMAGE_DESCRIPTION).stringValue);
139+
console.log(evt.detail.get(ExifTagNumber.IMAGE_DESCRIPTION).stringValue);
140+
});
141+
await parser.start();
142+
```
143+
144+
#### PNG Parser
145+
```javascript
146+
import { PngParser } from './bitjs/image/parsers/png.js'
147+
import { ExifTagNumber } from './bitjs/image/parsers/exif.js';
148+
149+
const parser = new PngParser(someArrayBuffer);
150+
parser.onExifProfile(evt => {
151+
console.log(evt.detail.get(ExifTagNumber.IMAGE_DESCRIPTION).stringValue);
141152
});
142153
await parser.start();
143154
```

0 commit comments

Comments
 (0)