Skip to content

stipple/nodejs-resize-image

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

About

For GET requests, dynamically resizes image using ImageMagick convert command and serves the resized image.

For example,

GET /some/image.jpg/10x20.jpg

will execute

convert srcDir/some/image.jpg -resize 10x20 destDir/tempFile.jpg

and serves

destDir/tempFile.jpg

convert command, srcDir, and destDir are configurable.

Getting started

Download and install Node.js:

cd node-v0.2.5
./configure --prefix=$HOME/opt/nodejs --without-ssl
make
make install
#add nodejs/bin to PATH

Run

node src/main.js

Configure

cp src/settings.js settings.local.js
vim settings.local.js
node src/main.js /absolute/path/to/settings.local.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published