@ryuu-reinzz/haruka-lib 2.0.4 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import fs from 'fs-extra';
|
|
2
2
|
import axios from 'axios';
|
|
3
3
|
import Utils, { defaultBg } from './Utils.js';
|
|
4
|
-
import
|
|
4
|
+
import pkg from 'file-type';
|
|
5
5
|
import convert from './internal/convert.js';
|
|
6
6
|
import Exif from './internal/Metadata/Exif.js';
|
|
7
7
|
import { StickerTypes } from './internal/Metadata/StickerTypes.js';
|
|
@@ -9,6 +9,7 @@ import { extractMetadata } from './index.js';
|
|
|
9
9
|
/**
|
|
10
10
|
* Sticker class
|
|
11
11
|
*/
|
|
12
|
+
const { fromBuffer } = pkg;
|
|
12
13
|
export class Sticker {
|
|
13
14
|
/**
|
|
14
15
|
* Sticker Constructor
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import web from 'node-webpmux';
|
|
2
2
|
import { TextEncoder } from 'util';
|
|
3
3
|
import RawMetadata from './RawMetadata.js';
|
|
4
|
+
const WebP = web;
|
|
4
5
|
export default class Exif {
|
|
5
6
|
constructor(options) {
|
|
6
7
|
this.exif = null;
|
|
@@ -22,7 +23,7 @@ export default class Exif {
|
|
|
22
23
|
image instanceof Image
|
|
23
24
|
? image
|
|
24
25
|
: await (async () => {
|
|
25
|
-
const img = new
|
|
26
|
+
const img = new WebP();
|
|
26
27
|
await img.load(image);
|
|
27
28
|
return img;
|
|
28
29
|
})();
|