Responsive images are landing soon and many organizations are looking for ways to resize images. Lenna is used in Flipkart for resizing images on the fly. The high CPU requirement due to resizing requires images to be cached on the CDN. Lenna can resize and alter the quality of the image. Currently support for jpeg, webp, png and gif has been provided.
The service makes remote calls to the storage system which hosts the original image which needs to be resized. The remote network call is wrapped around hystrix which enables a better insight into the system.
- brew Install Instructions
- git
brew install git
- XCode Command Line tools
xcode-select --install
- go Install Instructions
- imagemagick
brew install imagemagick
- magickwand
brew install magickwand
- Preferred IDE: IntelliJ 13.1.3+ (using vim/emacs/atom/mate/sublime is fine too)
- Clone the git repo:
git clone --recursive git@github.com:Flipkart/Lenna.git
- Change to root project directory
- Set Environment Variables
export GOROOT=
`export GOPATH=pwd
- Build
cd src/Lenna
go build
- Run
go run main.go
- Install golang plugin - 0.9.15+
- Setup Run Configuration for
Go Application
- Set environment variables
PATH=/usr/local/bin:/usr/bin:$PATH;GOPATH=<product_base_directory>/Lenna;GOROOT=;
- Set script to run:
<product_base_directory>/src/Lenna/main.go
- Set
GOPATH
to go home:export GOPATH=/usr/local/go
- Install bee tool:
go get github.com/beego/bee
- bee tool documentation:
http://beego.me/docs/install/bee.md