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

Avif encoder produces artifacts when SharpModifier::class is used #68

Open
deluxetom opened this issue Jan 18, 2025 · 1 comment
Open

Comments

@deluxetom
Copy link
Collaborator

deluxetom commented Jan 18, 2025

Describe the bug

After using the SharpModifier, if I encode the image to avif, it produces artifacts.
The output looks correct with other modifiers, only this one seems to cause issues.

Code Example

use Intervention\Image\Drivers\Vips\Driver as VipsDriver;
use Intervention\Image\ImageManager;

$image = ImageManager::withDriver(VipsDriver::class)
    ->read('trim.png')
    ->sharpen(5)
    ->toAvif();

Expected behavior

Image should match other encoders:

Image

Images

Current output in avif:

Image

Environment:

  • PHP Version: 8.1
  • OS: Ubuntu
  • Intervention Image Version: 3.11.0
  • php-vips Version: develop
  • libvips Version: 8.16.0
@deluxetom
Copy link
Collaborator Author

I tried using the sharpen vips method but I'm seeing artifacts as well, not as bad as the current method tho.

$image->core()->setNative(
    // $native->conv($this->getUnsharpMask())
    $native->sharpen(['sigma' => $this->amount])
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant