imagejs icon indicating copy to clipboard operation
imagejs copied to clipboard

Image resize

Open cristea2017 opened this issue 5 years ago • 1 comments
trafficstars

After reading a png image i try to resize that by following code var thumbnail = bitmap.resize({ width: 128, height: 128, algorithm: "nearestNeighbor", }); Here a got result (left image) image is resizing but somethink happened with image

!!!Right image is source image!!!

Screenshot 2020-07-16 at 11 08 31

how to resolve that ?

cristea2017 avatar Jul 16 '20 08:07 cristea2017

After reading a png image i try to resize that by following code var thumbnail = bitmap.resize({ width: 128, height: 128, algorithm: "nearestNeighbor", }); Here a got result (left image) image is resizing but somethink happened with image

!!!Right image is source image!!!

Screenshot 2020-07-16 at 11 08 31

how to resolve that ?

If you don't find solution for this , try this out https://www.npmjs.com/package/image-js works ideally for resizing ;)

cristea2017 avatar Jul 16 '20 10:07 cristea2017