.. ok, i guess one node buffer can't be moved but the other magically can.
This commit is contained in:
@@ -19,6 +19,8 @@ function GetRawSharpOptions(size: Size): sharp.CreateRaw {
|
||||
}
|
||||
|
||||
export default async (opts: any) => {
|
||||
try {
|
||||
console.log(opts)
|
||||
let out = await sharp(opts.buffer, { raw: GetRawSharpOptions(opts.size) })
|
||||
.resize(kThumbnailSize.width, kThumbnailSize.height, { fit: 'fill' })
|
||||
.jpeg({
|
||||
@@ -27,5 +29,9 @@ export default async (opts: any) => {
|
||||
.toFormat('jpeg')
|
||||
.toBuffer();
|
||||
|
||||
return Piscina.move(out);
|
||||
return out;
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user