(tag)
| 269 | } |
| 270 | |
| 271 | #readUserComment(tag) { |
| 272 | this.#reader.seek(this.#start + tag.offset, false); |
| 273 | const encoding = this.#reader.read(8); |
| 274 | if (encoding !== 0x45444f43494e55n) { |
| 275 | throw new Error("Unable to read non-Unicode data"); |
| 276 | } |
| 277 | const decoder = new TextDecoder("utf-16be"); |
| 278 | return decoder.decode(new DataView(this.#reader.view.buffer, this.#reader.offset, tag.count - 8)); |
| 279 | } |
| 280 | |
| 281 | #readExifTag(exifTag) { |
| 282 | const EXIF_USER_COMMENT = 0x9286; |
no test coverage detected