Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No JPEG support in this PHP build #140

Closed
Maxoplata opened this issue Jul 26, 2023 · 2 comments
Closed

No JPEG support in this PHP build #140

Maxoplata opened this issue Jul 26, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request php

Comments

@Maxoplata
Copy link

I'm assuming this is the correct repo for this issue, but I'm not 100% sure.

I am able to use imagecreatefromstring() to load PNG and GIF images, but not JPEG images. When I try to load a JPEG, I get this error:

imagecreatefromstring(): No JPEG support in this PHP build

Here is a code example that causes the error:

$fileData = file_get_contents('/path/to/image.jpg');
$image = imagecreatefromstring($fileData);
@vitorleonel
Copy link

vitorleonel commented Jul 30, 2023

I saw that we aren't compiling the PHP with the gd extension. It should be the case.

@mpociot could it be included? I mean, I saw some PR saying that we are keeping a small list of extensions, so that's why I'm asking.

Are you able to compile the PHP with that extension (gd) @Maxoplata? So you can validate it and we could know that this is the case.

@simonhamp simonhamp transferred this issue from NativePHP/php-bin Aug 3, 2023
@simonhamp simonhamp added enhancement New feature or request php labels Aug 3, 2023
@simonhamp simonhamp self-assigned this Apr 28, 2024
@simonhamp
Copy link
Member

simonhamp commented Apr 28, 2024

The specific extensions we can add will depend upon whether they're ready for cross-platform support.

Please consult the static-php-cli Extensions table for details of which extensions are available across the major platforms.

As of this writing, gd is not available for static builds for Windows. I've requested it. When it is, then I'll look to add it to future builds 👍🏼

Will leave this issue open until then.

@NativePHP NativePHP locked and limited conversation to collaborators May 1, 2024
@simonhamp simonhamp converted this issue into discussion #281 May 1, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement New feature or request php
Projects
None yet
Development

No branches or pull requests

3 participants