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

Clarify the difference between ImageMagick::setColorspace() and ImageMagick::setImageColorspace() #2989

Open
php4fan opened this issue Dec 3, 2023 · 0 comments

Comments

@php4fan
Copy link
Contributor

php4fan commented Dec 3, 2023

From manual page: https://php.net/imagick.setimagecolorspace


By reading
https://www.php.net/manual/en/imagick.setcolorspace.php and
https://www.php.net/manual/en/imagick.setimagecolorspace.php

I honestly can't tell the differene between the two, when I should use one and when the other.
There's no example for either of them. (BTW there shoudl ALWAYS be examples, every single page of the documentation should have examples)

The descriptions are slightly different:

public Imagick::setColorspace(int $COLORSPACE): bool
Sets the global colorspace value for the object.

vs

public Imagick::setImageColorspace(int $colorspace): bool
Sets the image colorspace. This method should be used when creating new images. To change the colorspace of an existing image, you should use Imagick::transformImageColorspace().

but it's not clear what the difference is between the "global workspace for the object" and "the image colorspace".

This difference should be clarified in both pages. Or if they are actually the same thing, it should be explicitly stated that one is an alias for the other.

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

2 participants