0

From Googling/SOing around it looks like browsers are not capable, but am looking for a way to resize (scale) images in client-side javascript with similar results to Gimp or ImageMagick, i.e no loss of "quality".

Is this possible?

Kappa
  • 1,015
  • 1
  • 16
  • 31
Richard H
  • 38,037
  • 37
  • 111
  • 138
  • Do you mean with sharp edges? That would be [`image-rendering`](https://developer.mozilla.org/en/docs/Web/CSS/image-rendering). – Sebastian Simon Apr 07 '16 at 22:15
  • 1
    I was unaware you lost quality in an image when you resize it in the browser - could you elaborate further? – Nick Zuber Apr 07 '16 at 22:15
  • 2
    If you mean sharp edges (without antialiasing) then this is a dupe of [How to stretch images with no antialiasing](http://stackoverflow.com/q/8597081/4642212) or [Disable antialising when scaling images](http://stackoverflow.com/q/14068103/4642212). – Sebastian Simon Apr 07 '16 at 22:22
  • what quality are you talking about? the felt quality of an image, or the quality-settings when encoding? – Thomas Apr 07 '16 at 23:05
  • @Thomas the "quality-settings" I believe. When I do a re-size in Gimp I get a quality option 0 - 100. I want to scale with "100" quality (whatever that really means) – Richard H Apr 08 '16 at 07:44
  • @RichardH Just to cover these topics: you never scale with a quality-setting. the quality-setting is a parameter of the encoding-process for the JPEG-encoder. So if you get immediately an modal that asks you for the quality-setting this means, that immediately after the resizing, GIMP recodes the image, wich in my optinion is a bad thing, cause so you potentiate quality-loss; it should use the raw pixel-data until **you are finished and ask him** to encode (save) the result. But that's off topic. Although it leads me to the question: **what are actually you trying to build?** – Thomas Apr 08 '16 at 13:15
  • Have you tried this solution? http://stackoverflow.com/questions/961913/image-resize-before-upload – loosinginnocence Jun 17 '16 at 21:21

0 Answers0