twopointone / image-resize-lambda

Image Resizing AWS Lambda using Smartcrop.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Following processing to work for images

vikalpj opened this issue · comments

  • /image/WIDTHxHEIGHT:crop/key - only crops by resizing the image and keeping portion as center gravity.
  • /image/WIDTHxHEIGHT:cover/key - resizes the image without cropping anything, one of the dimensions may be smaller than provided.
  • /image/WIDTHxHEIGHT:smart/key - do not crop more than necessary (user minimal option in smartcrop) and select area to keep based on interestingness.

In smartcrop, I think the minimal option is not required. I tested locally with two images and output seems good even without using it.

@rubish Sure, Let me check and update...

Added 3rd one is called smart crop with url
/image/WIDTHxHEIGHT:smartcrop/key

PR - #7