ariya / phantomjs

Scriptable Headless Browser
http://phantomjs.org
BSD 3-Clause "New" or "Revised" License
29.46k stars 5.76k forks source link

how to improve the quality of thumbnail generated #15444

Closed programmerarunkumar closed 4 years ago

programmerarunkumar commented 4 years ago

Describe the problem How to improve the quality of thumbnail generated using rasterize.js Thumbnail size 1.300x170 2.200x170

PhantomJS version : 2.1.1 OS: Linux

In My rasterize.js 1.used viewport size 2.used quality in page.render

Actual behavior Quality of the thumbnail is not good

Expected behavior Need a high quality thumbnail generation

ariya commented 4 years ago

Hi @programmerarunkumar, we need an example to show the expected quality that you want. Thanks!

programmerarunkumar commented 4 years ago

Hi @programmerarunkumar, we need an example to show the expected quality that you want. Thanks!

what are the possible ways to improve the qauality of thumbnail image generated using rasterize.js . Thanks!

programmerarunkumar commented 4 years ago

Hi @programmerarunkumar, we need an example to show the expected quality that you want. Thanks!

---OriginalImage(960x540)--

OriginalImage

--Thumbnail Image(300x170)---

ThumbnailImages

Need to increase the resolution of the ThumbnailImage. Used page.render(fileName, { format: 'png' ,quality: '100'}) , still not getting high resolution Thumbnail Image How to achive that ?

ariya commented 4 years ago

PhantomJS isn't intended to be a full-featured image processing tool. I recommend taking the original image and create the thumbnail with a dedicated utility such as ImageMagick. Thank you very much!