imagez icon indicating copy to clipboard operation
imagez copied to clipboard

Access to imgscalr options

Open vvvvalvalval opened this issue 9 years ago • 9 comments

I've been using imagez to scale down JPEG images but I was dissatisfied with the output quality.

Turns out that you can improve it significantly by using the ULTRA_QUALITY method of imgscalr.

would be interesting to make those options accessible.

vvvvalvalval avatar Feb 17 '16 15:02 vvvvalvalval

Sounds like a good idea. Perhaps ULTRA_QUALITY should even be the default?

mikera avatar Feb 18 '16 02:02 mikera

@mikera I agree, I cannot see any reason not to use it by default (except performance requirements).

vvvvalvalval avatar Feb 18 '16 08:02 vvvvalvalval

@mikera On second thought, having dived a little bit in the documentation, I believe the best course of action is to leave AUTOMATIC by default (which by definition is meant to let the library try and be smart about the algorithm to be used), while exposing tuning options to the user and providing her a link to the documentation.

vvvvalvalval avatar Feb 18 '16 09:02 vvvvalvalval

Hi. I am facing the same issue. I can't get a good quality output after scaling (resizing) down an image. @vvvvalvalval, how did you solve the problem?

rcanepa avatar Mar 29 '16 00:03 rcanepa

@rcanepa I ended up going down to ImgScalr via Java interop. Shoud be fairly easy for you to do by looking at the source code of imagez.

vvvvalvalval avatar Mar 30 '16 08:03 vvvvalvalval

@vvvvalvalval, excellent. I'll do that too.

rcanepa avatar Mar 30 '16 13:03 rcanepa

Happy to have a PR that exposes the options to Clojure (as an additional options map)

mikera avatar Mar 30 '16 14:03 mikera

@mikera just started using this library - it's fantastic. I have a need for this too, are you still open to PRs?

brianium avatar May 06 '18 20:05 brianium

Glad you like it! PRs very welcome!

mikera avatar May 07 '18 00:05 mikera