From 166607576dce22810b6953ade32842eb34853ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmad=20Awais=20=E2=9A=A1=EF=B8=8F?= Date: Fri, 5 Jul 2019 00:24:38 +0500 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=91=8C=20IMPROVE:=20Syntax=20+=20Docs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/plugin-resize/README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/plugin-resize/README.md b/packages/plugin-resize/README.md index a8069f986..3df3250ce 100644 --- a/packages/plugin-resize/README.md +++ b/packages/plugin-resize/README.md @@ -18,9 +18,14 @@ Resizes the image to a set width and height using a 2-pass bilinear algorithm/ import jimp from 'jimp'; async function main() { - const image = await jimp.read('test/image.png'); + // Read the image. + const image = await jimp.read('test/image.png'); - image.resize(150, jimp.AUTO); + // Resize the image to width 150 and auto height. + await image.resize(150, jimp.AUTO); + + // Save and overwrite the image + await image.write('test/image.png'); } main(); From 9eeeba8b8b91a4079cacbafb0e5c58aa1e8e8400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmad=20Awais=20=E2=9A=A1=EF=B8=8F?= Date: Thu, 15 Aug 2019 12:44:10 +0500 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=91=8C=20IMPROVE:=20Await=20the=20wri?= =?UTF-8?q?teAsync=20method?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/plugin-resize/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-resize/README.md b/packages/plugin-resize/README.md index 3df3250ce..9185cc838 100644 --- a/packages/plugin-resize/README.md +++ b/packages/plugin-resize/README.md @@ -25,7 +25,7 @@ async function main() { await image.resize(150, jimp.AUTO); // Save and overwrite the image - await image.write('test/image.png'); + await image.writeAsync('test/image.png'); } main();