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

The result of reduceColors(1) followed by pickColor(0, 0)->toString() only returns rgb(0, 0, 0). #1409

Closed
ani2life opened this issue Dec 31, 2024 · 2 comments · Fixed by #1410

Comments

@ani2life
Copy link

Describe the bug

The result of reduceColors(1) followed by pickColor(0, 0)->toString() only returns rgb(0, 0, 0).

Code Example

$file_path = 'img.jpg';
$image = \Intervention\Image\ImageManager::gd()->read($file_path);

$image->reduceColors(1);
echo $image->pickColor(0, 0)->toString(); // only rgb(0, 0, 0)

$image->resize(1, 1);
echo $image->pickColor(0, 0)->toString(); // correct rgb code

Environment (please complete the following information):

  • PHP Version: 8.4.1
  • OS: Docker image php:8.4.1-fpm
  • Intervention Image Version: 3.10.1
  • GD or Imagick: GD
@olivervogel
Copy link
Member

Thanks for reporting. This seems to occur only with GD. I do not yet know what the reason for the error is, but there are already tests that verify the issue.

@olivervogel
Copy link
Member

This is fixed in 3.10.2.

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

Successfully merging a pull request may close this issue.

2 participants