Grayscale
Converts the image to grayscale.
How to use
The grayscale transformation allows you to convert a color image to grayscale (black and white).
Pass the following query param to the API endpoint:
grayscale=true
Parameter
grayscale
: Set this parameter to true
to convert the image to grayscale. No other values are accepted.
Effect of Grayscale Transformation
- Removes all color information from the image, leaving only shades of gray.
- Maintains the luminance (brightness) of the original image.
- Can enhance contrast and bring focus to the form, texture, and composition of the image.
This transformation is useful for creating classic black and white looks, reducing distractions in images, or preparing images for certain types of analysis or processing.
Original Image
URL : https://www.thunderimage.com/sample/yosemite.jpg
Grayscale Image
URL: /transform?url=https://www.thunderimage.com/sample/yosemite.jpg&grayscale=true
Best Practices
- Use grayscale to emphasize form, texture, and composition in images.
- Consider adjusting contrast after applying grayscale for more impactful black and white images.
- Grayscale can be effective for portraits, landscapes, and architectural photography.
- When using grayscale for web design, ensure sufficient contrast for text readability.
- Remember that grayscale can change the mood and focus of an image significantly, so use it intentionally.
Note
The grayscale transformation is a binary operation - either the image is converted to grayscale or it remains in color. There are no intermediate steps or levels of grayscale conversion available with this parameter.
Authorizations
API key required for authentication
Query Parameters
The URL of the image to be transformed.
Set to 'true' to convert the image to grayscale.
Response
The transformed image in JPEG format.