Skip to content
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 build #460

Open
vvdboogaard opened this issue Jan 2, 2025 · 1 comment
Open

No JPEG support in build #460

vvdboogaard opened this issue Jan 2, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@vvdboogaard
Copy link

What were you trying to do?

Trying to modify an jpeg image with GD.

What happened?

When modifying the image, if fails:

Error: Call to undefined function Intervention\Image\Drivers\Gd\Decoders\imagecreatefromjpeg() in [..]/vendor/intervention/image/src/Drivers/Gd/Decoders/FilePathImageDecoder.php:35

When using a png file it works like intended.

When var dumping gd_info() it shows JPEG support isn't enabled

array(14) {
    ["GD Version"]=>
    string(26) "bundled (2.1.0 compatible)"
    ["FreeType Support"]=>
    bool(false)
    ["GIF Read Support"]=>
    bool(true)
    ["GIF Create Support"]=>
    bool(true)
    ["JPEG Support"]=>
    bool(false)
    ["PNG Support"]=>
    bool(true)
    ["WBMP Support"]=>
    bool(true)
    ["XPM Support"]=>
    bool(false)
    ["XBM Support"]=>
    bool(true)
    ["WebP Support"]=>
    bool(false)
    ["BMP Support"]=>
    bool(true)
    ["AVIF Support"]=>
    bool(false)
    ["TGA Read Support"]=>
    bool(true)
    ["JIS-mapped Japanese Font Support"]=>
    bool(false)
}

How to reproduce the bug

Modify a image using the function imagecreatefromjpeg().

Package Versions

{
    "installed": [
        {
            "name": "nativephp/electron",
            "direct-dependency": true,
            "homepage": "https://github.com/nativephp/electron",
            "source": "https://github.com/NativePHP/electron/tree/0.9.0",
            "version": "0.9.0",
            "description": "Electron wrapper for the NativePHP framework.",
            "abandoned": false
        },
        {
            "name": "nativephp/laravel",
            "direct-dependency": false,
            "homepage": "https://github.com/nativephp/laravel",
            "source": "https://github.com/NativePHP/laravel/tree/0.7.0",
            "version": "0.7.0",
            "description": "Laravel wrapper for the NativePHP framework.",
            "abandoned": false
        },
        {
            "name": "nativephp/php-bin",
            "direct-dependency": false,
            "homepage": "https://nativephp.com",
            "source": "https://github.com/NativePHP/php-bin/tree/0.5.6",
            "version": "0.5.6",
            "description": "PHP binaries used by the NativePHP framework",
            "abandoned": false
        }
    ]
}

PHP Version

8.2.27

Laravel Version

11.36.1

Node Version

22.12.0

Which operating systems have you seen this occur on?

No response

OS version

15.0.1 (24A348)

Notes

No response

@vvdboogaard vvdboogaard added the bug Something isn't working label Jan 2, 2025
@simonhamp
Copy link
Member

I think we'll need to change the build process:

- ./bin/spc build --build-cli "${{ env.PHP_EXTENSIONS }}"
+ ./bin/spc build --build-cli --with-libs="libjpeg,freetype,libwebp"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants