cytopia / devilbox

A modern Docker LAMP stack and MEAN stack for local development
http://devilbox.org
MIT License
4.38k stars 652 forks source link

Add jpeg support to GD PHP module. #544

Closed ghost closed 5 years ago

ghost commented 5 years ago

ISSUE TYPE

SUMMARY

The GD PHP module included is incomplete and does not have JPEG Support or libJPEG version listed in PHP Info. GD would be better with jpeg support.

Goal

I'm not sure where else this would have an effect but the CMS I develop with (ProcessWire) is throwing an error because it relies on the jpeg functionality of GD for image uploads/processing. This may solve more problems elsewhere as well. Would make Devilbox usable for development for more people.

cytopia commented 5 years ago

Valid point and good catch. I will have to dig a bit how to actually include it.

cytopia commented 5 years ago

@skylundy I just double checked the compile options for gd:

--with-gd --with-webp-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --enable-gd-jis-conv --enable-gd-native-ttf

It should actually bundle jpeg:

Do you see anything which is done wrong here?

cytopia commented 5 years ago

Also looking at the phpinfo() output, jpeg is bundled.

Screenshot 2019-03-16 11-48-16  selection

ghost commented 5 years ago

Yours looks right, mine looks wrong... Not sure what the fix is. I've pulled the latest version.

Screenshot from 2019-03-17 08-47-30

cytopia commented 5 years ago

So which PHP version are you using and on which Devilbox git commit are you on?

ghost commented 5 years ago

I'm on the latest commit. I did find the solution though- I was on PHP 7.4, I went down to 7.3 and jpeg support is now available.

cytopia commented 5 years ago

7.4 and 8.0 are not stable and thus not fully supported by this project as well. I will close this issue. If you find a way to integrate full jpeg support into PHP 7.4 please do so via PR, I would be happy to review.

ghost commented 5 years ago

Thanks for your fast response, my mistake on this!