zivester / node-quickthumb

On the fly, thumbnail creation middleware for express.
MIT License
85 stars 24 forks source link

Rotate portrait image on resize #4

Closed LunaPg closed 10 years ago

LunaPg commented 10 years ago

Hi folks !

I'm using quickthumb in express to resize my pictures. I've got an issue with portrait images.

Original pictures are in portrait mode, when Quickthumb resize these pictures, it save theses images in landscape mode.

Obviously, no probleme with Landscape photos :P

zivester commented 10 years ago

It should work perfectly fine for any size image. You may want to use the "resize" option instead of the default "crop" mode. So it should be declared something like:

 app.use('/public/resize', qt.static(__dirname + '/../public', { type : 'resize' }) );
<img src="/public/resize/images/gali.jpg?dim=x200">

Please see an example here: https://github.com/zivester/node-quickthumb/blob/master/test/express-test.js#L10