« first day (4208 days earlier)      last day (733 days later) » 

cmb
10:50 AM
@JoeWatkins, @PatrickAllaert, @ramsey, selection of new release managers is overdue (unless we want to delay PHP 8.2)
 
11:13 AM
That came about quick
 
cmb
tempus fugit :)
 
 
2 hours later…
1:26 PM
is there any function in GD library that auto detect file format?
there are imagecreatefrompng and imagecreatefromjpg
need something that just accept image file
$method = str_ends_with($file, 'jpg') ? 'imagecreatefromjpeg' : 'imagecreatefrompng';
 
cmb
2:18 PM
There is imagecreatefromstring, but I never use it. Better to use the appropriate function for the file extension (pathinfo($filename, PATHINFO_EXTENSION).
 
2:40 PM
Hi guys
 
 
3 hours later…
5:38 PM
@cmb Is there any particular reason why it shouldn't be used? It's my go-to for image loading and if there's issues I'd like to address them in my code.
 
cmb
@MarkR Mostly because of unnecessary memory usage (you need to read a string first). But I'm not that sure that image formats are properly recognized; probably not an issue with contemporary formats, though. Still, I prefer to have the file extension have a proper meaning.
 
@cmb Do we have something like imagecreatefromtype that I'm not seeing, or does it have to depend on an if block for every format (or some fancypants array of extensions to callables?)
 
Wes
 
cmb
5:54 PM
@MarkR Nope, there's nothing like that in PHP. GD has gdImageCreateFromFile() for many years, though. But it's not hard to write that function in userland anyway.
 
6:39 PM
@cmb Literal shower thought for this while I remember. Perhaps it would be appropriate to ask the powers that be at the foundation if this can be a paid position.
 
cmb
@MarkR certainly something to consider, although we haven't been short of volunteers during the last years
 
 
3 hours later…
9:29 PM
Hey @Danack you still holding up? I noticed you hadn't been about for a couple of weeks.
 

« first day (4208 days earlier)      last day (733 days later) »