imaging icon indicating copy to clipboard operation
imaging copied to clipboard

typo in README

Open jftuga opened this issue 4 years ago • 1 comments

under the FAQ you have:

The stadard image/* packages do not...

standard is misspelled.


Also what is the difference between Resize() and Fit()?

jftuga avatar Nov 23 '20 22:11 jftuga

Thank you! Fixed it.

  • Fit preserves the aspect ratio of the original image. It resizes the image only if its size is larger than the given bounding box, i.e. it may only downscale the image.
  • Resize on the other hand always changes the image size to the exact size requested. If one of the given dimensions is zero, it also preserves the original aspect ratio. It may be used both for upscaling and downscaling.

E.g.

Original image is 400x200 px.

Fit(img, 100, 100, ...) returns 100x50 px image.
Fit(img, 1000, 1000, ...) returns 400x200 px image (unchanged).

Resize(img, 100, 100, ...) returns 100x100 px image.
Resize(img, 100, 0, ...) returns 100x50 px image.
Resize(img, 0, 100, ...) returns 200x100 px image.
Resize(img, 1000, 1000, ...) returns 1000x1000 px image.

disintegration avatar Nov 25 '20 07:11 disintegration