angular-thumbnail icon indicating copy to clipboard operation
angular-thumbnail copied to clipboard

image quality is reduced

Open neilmaledev opened this issue 8 years ago • 1 comments

How to maintain image quality?

neilmaledev avatar Aug 23 '17 04:08 neilmaledev

It's using either canvas.toBlob or canvas.toDataURL to generate the thumbnail.

You can tweak the quality by passing in more options:

ThumbnailService.generate('src', {
  opts: {
    encoderOptions: 1
  }
});

However, as per the documents the default value is 0.92 and the returned image is in a resolution of 96 dpi. It's up to vendor implementation and we probably don't have much control over at the moment.

kennyki avatar Aug 23 '17 04:08 kennyki