openam / calibrephp

Calibre HTML and OPDS web server based on CakePHP
http://openam.github.io/calibrephp
MIT License
39 stars 14 forks source link

Image resizing function not reliable #1

Closed mburtscher closed 10 years ago

mburtscher commented 11 years ago

The image resizing functionality used in the project is not very reliable. I tried using this on a Ubuntu 13.04 machine which has a typical LAMP stack + imagick/mogrify installed. But image resizing fails for some reason.

The resizing is based on the convert command which I think is not a good idea. Especially because a lot of machines won't allow the www-data user to execute commands like convert. Replacing the resizing algorithm with something PHP based (GD/Imagick) would be cleaner.

openam commented 11 years ago

I've been running this on Ubuntu 12.04 without problems. I'm not opposed to using something like GD/Imagick. Do you have any libraries that use either of the two? Preferably it would be one that checks for for one and falls back to the other if not available.

The convert command is part of imagemagick. You may have to install it in ubuntu. sudo apt-get install imagemagick

openam commented 11 years ago

If you'd like to change it over to GD/Imagick please create create the changes and generate a pull request.

mburtscher commented 11 years ago

We're having an internal library here at Fusonic which would do the trick. It should be open-sourced soon, I will then create a pull-request. In the meatime I'll check what the real problem is. Imagick is installed ...

I'm working on a "share by e-mail" feature, create a pull-request for this the next days.

openam commented 10 years ago

It looks like there is a simple way to use GD shown on tutsplus.com. I'm thinking of switching the image conversion over to something along these lines instead of calling a shell command, which some people have disable for security perposes, #3.

LibreriaDigitalAmalibaka commented 10 years ago

excelent