Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2020-02-19 10:48:01

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

changes in PHP 7.4+

There seems to ba a number of changes on PHP 7.4 which might affect us. for me at least the most notable is:

GD

The behavior of imagecropauto() in the bundled libgd has been synced with that of system libgd:

IMG_CROP_DEFAULT is no longer falling back to IMG_CROP_SIDES Threshold-cropping now uses the algorithm of system libgd

The default $mode parameter of imagecropauto() has been changed to IMG_CROP_DEFAULT; passing -1 is now deprecated.

imagescale() now supports aspect ratio preserving scaling to a fixed height by passing -1 as $new_width.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#2 2020-02-19 10:52:32

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: changes in PHP 7.4+

The sooner we can get off our reliance on GD the better. It makes a piss-poor job of creating automatic thumbnails.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#3 2020-02-19 11:12:30

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: changes in PHP 7.4+

Bloke wrote #321775:

The sooner we can get off our reliance on GD the better. It makes a piss-poor job of creating automatic thumbnails.

it is one of the most ubiquitously installed library though, and helps txp work without any real special server specs.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#4 2020-02-19 11:14:11

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,137
GitHub

Re: changes in PHP 7.4+

Yeah, I got caught out with 7.4 on my server playbook. I muddled through the compile flags and I think I’ve mostly got it working as 7.3 was, but I’m still scratching my head on a few things.

We’ve got a few things lined up for the future, including 913 for ImageMagick support, which looks much more promising.

Offline

#5 2020-02-19 11:23:47

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: changes in PHP 7.4+

colak wrote #321777:

it is one of the most ubiquitously installed library though, and helps txp work without any real special server specs.

True. I’m not suggesting we remove it completely, just use it as fallback if no better alternative is present. If you know of any other libraries besides ImageMagick that might be more useful and make a better job of image handling, then by all means suggest them.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#6 2020-02-19 11:26:41

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,137
GitHub

Re: changes in PHP 7.4+

Bloke wrote #321780:

If you know of any other libraries besides ImageMagick that might be more useful and make a better job of image handling, then by all means suggest them.

Would this be of any use in reducing the work involved with ImageMagick integration or improved GD handling? MIT, so appears to be friendly on the licensing.

Edit: there’s also GraphicsMagick that might be worth a look re: integration.

Last edited by gaekwad (2020-02-19 11:27:49)

Offline

#7 2020-02-19 11:32:26

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: changes in PHP 7.4+

gaekwad wrote #321781:

Would [Intervention/image] be of any use in reducing the work involved with ImageMagick integration or improved GD handling?

I like the idea of that. Nice that it falls back on GD automatically. Well worth investigating if it has a reasonably small footprint. EDIT: which I guess if it supports Laravel, it doesn’t!

there’s also GraphicsMagick that might be worth a look re: integration.

Woah, that’s heavy. But looks fully featured. Not something we’d necessarily ship with Txp I expect :) I wonder what its penetration level on hosting servers around the world is.

Last edited by Bloke (2020-02-19 11:34:06)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#8 2020-02-19 11:43:42

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,137
GitHub

Re: changes in PHP 7.4+

Bloke wrote #321784:

I like the idea of that. Nice that it falls back on GD automatically. Well worth investigating if it has a reasonably small footprint. EDIT: which I guess if it supports Laravel, it doesn’t!

The Image folder is ~594KB on disk, including the Laravel stuff, presumably that can be pared back.

Offline

#9 2020-02-19 11:47:29

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,137
GitHub

Re: changes in PHP 7.4+

Created 1472 to track it.

Offline

#10 2020-02-19 12:00:35

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: changes in PHP 7.4+

My knowledge stops at Gimp, although I like Pete’s recommendations, I would have no idea on how to install them in the server.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#11 2020-02-19 12:03:01

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,137
GitHub

Re: changes in PHP 7.4+

colak wrote #321787:

I would have no idea on how to install them in the server.

I know you’re not asking directly…but please contact me if you ever need to and I will gladly show you the way.

Offline

#12 2020-02-19 12:10:15

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: changes in PHP 7.4+

gaekwad wrote #321788:

I know you’re not asking directly…but please contact me if you ever need to and I will gladly show you the way.

Thanks so much Pete!!!


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB