Coder Social home page Coder Social logo

twopointone / image-resize-lambda Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 3.0 14.36 MB

Image Resizing AWS Lambda using Smartcrop.js

License: MIT License

Makefile 2.59% JavaScript 95.18% Dockerfile 2.23%
aws-lambda smartcrop smartcrop-sharp sharp image-resize image-crop

image-resize-lambda's People

Contributors

chaudhary avatar harshal27 avatar rubish avatar vikalpj avatar

Stargazers

 avatar

Watchers

 avatar  avatar

image-resize-lambda's Issues

handle errors gracefully.

When the handler function tries to find the width and size and the regex is not matched a error is raised at the node server and is not handled

Lets try to move width and height calculations before actually calling the image processing function

In https://github.com/PrimeDigitalGlobal/image-resize-lambda/pull/14/files#diff-d06c639d4804f2f7ec74ed3beb48dcd7R111 We are doing processing of width & height at 2 places

  1. Inside the image processing function itself and
  2. In validateImageCropSize (https://github.com/PrimeDigitalGlobal/image-resize-lambda/pull/14/files#diff-d06c639d4804f2f7ec74ed3beb48dcd7R53)

Lets try to move every thing at one place ideally when validateImageCropSize is called.

Add Following processing to work for images

  • /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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.