Natives Rework (Thank you Essem)
Co-authored-by: Essem <TheEssem@users.noreply.github.com>
This commit is contained in:
parent
b424b2f813
commit
ff7f0a3110
88 changed files with 3358 additions and 3104 deletions
|
@ -50,7 +50,9 @@ export default function run(object) {
|
|||
const result = img.image(object.cmd, objectWithFixedType);
|
||||
const returnObject = {
|
||||
buffer: result.data,
|
||||
fileExtension: result.type
|
||||
fileExtension: result.type,
|
||||
width: result.width,
|
||||
height: result.height
|
||||
};
|
||||
resolve(returnObject);
|
||||
} catch (e) {
|
||||
|
|
|
@ -135,7 +135,9 @@ function waitForWorker(worker) {
|
|||
worker.once("message", (data) => {
|
||||
resolve({
|
||||
buffer: Buffer.from([...data.buffer]),
|
||||
type: data.fileExtension
|
||||
type: data.fileExtension,
|
||||
width: data.width,
|
||||
height: data.height
|
||||
});
|
||||
});
|
||||
worker.once("error", reject);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue