Walhalla

walhalla.image

Scalr.Method

Used to define the different scaling hints that the algorithm can use.

AUTOMATICMethod

Used to indicate that the scaling implementation should decide which method to use in order to get the best looking scaled image in the least amount of time.

The scaling algorithm will use the Scalr#THRESHOLD_QUALITY_BALANCED or Scalr#THRESHOLD_BALANCED_SPEED thresholds as cut-offs to decide between selecting the QUALITY, BALANCED or SPEED scaling algorithms.

By default the thresholds chosen will give nearly the best looking result in the fastest amount of time. We intend this method to work for 80% of people looking to scale an image quickly and get a good looking result.

SPEEDMethod

Used to indicate that the scaling implementation should scale as fast as possible and return a result. For smaller images (800px in size) this can result in noticeable aliasing but it can be a few magnitudes times faster than using the QUALITY method.

BALANCEDMethod

Used to indicate that the scaling implementation should use a scaling operation balanced between SPEED and QUALITY. Sometimes SPEED looks too low quality to be useful (e.g. text can become unreadable when scaled using SPEED) but using QUALITY mode will increase the processing time too much. This mode provides a "better than SPEED" quality in a "less than QUALITY" amount of time.

QUALITYMethod

Used to indicate that the scaling implementation should do everything it can to create as nice of a result as possible. This approach is most important for smaller pictures (800px or smaller) and less important for larger pictures as the difference between this method and the SPEED method become less and less noticeable as the source-image size increases. Using the AUTOMATIC method will automatically prefer the QUALITY method when scaling an image down below 800px in size.

ULTRA_QUALITYMethod

Used to indicate that the scaling implementation should go above and beyond the work done by Method#QUALITY to make the image look exceptionally good at the cost of more processing time. This is especially evident when generating thumbnails of images that look jagged with some of the other Methods (even Method#QUALITY).

values()Method

Method

valueOf(Stringname)Method

Stringname
Method