0.11.1 • Published 7 years ago

sweets-brittle-image v0.11.1

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

Sweets

Flexible declarative web framework for real-time projects

Brittle image

Image processor for sweets-brittle

Methods

resize

  • name — added to the file name in result
  • width — number
  • height — number
  • mask — path to mask file, relative to media path
  • blurradius, sigma
  • fit — fit option, default clip
    • clip — resizes the image to fit within the width and height boundaries without cropping or distorting the image. The resulting image will match one of the constraining dimensions, while the other dimension is altered to maintain the same aspect ratio of the input image.
    • crop — resizes the image to fill the width and height dimensions and crops any excess image data. The resulting image will match the width and height constraints without distorting the image.
    • max — resizes the image to fit within the width and height dimensions without cropping or distorting the image, but will not increase the size of the image if it is smaller than the output size. The resulting image will maintain the same aspect ratio of the input image.
    • min — resizes and crops the image to match the aspect ratio of the requested width and height. Will not exceed the original width and height of the image.
    • scale — scales the image to fit the constraining dimensions exactly. The resulting image will fill the dimensions, and will not maintain the aspect ratio of the input image.
  • gravity — string, default center. north, east, south, west, northeast, southeast, southwest, northwest, center, entropy, attention
    • entropy — focus on the region with the highest Shannon entropy.
    • attention — focus on the region with the highest luminance frequency, colour saturation and presence of skin tones.

last 2 options not avalible for gif output

  • type — output file type or "auto", object with type options
    • id — output format (auto or jpeg, png, gif, etc...)
    • quality — number 1..100 (can be vary check different formats options)

resize command adds name option to file name

Image processor can accept an array of values - it will find the closest width/height for the provided image.

GIF

If you need write to gif format you need to install gifsicle

License MIT

© velocityzen

0.11.1

7 years ago

0.11.0

7 years ago

0.10.4

7 years ago

0.10.3

7 years ago

0.10.2

7 years ago

0.10.1

7 years ago

0.10.0

7 years ago

0.9.9

7 years ago

0.9.8

7 years ago

0.9.7

8 years ago

0.9.6

8 years ago

0.9.4

8 years ago

0.9.3

8 years ago

0.9.2

8 years ago

0.9.1

8 years ago

0.9.0

8 years ago