# ImageGrayScale / ImageGreyScale

Converts an image to grayscale. This BIF allows you to remove color and produce a black-and-white version of an image in BoxLang.

## Syntax

```
ImageGrayScale(name)
ImageGreyScale(name)
```

## Arguments

| Name | Type | Required | Description                                                             |
| ---- | ---- | -------- | ----------------------------------------------------------------------- |
| name | any  | Yes      | The image or the name of a variable referencing an image to operate on. |

## Returns

* **BoxImage**: The modified BoxImage instance in grayscale.

## Description

`ImageGrayScale` (also available as `ImageGreyScale`) converts the specified image to grayscale, removing all color information. The image can be passed directly or referenced by variable name.

## Example

```boxlang
// Convert an image to grayscale
grayImg = ImageGrayScale(myImage);
// Or using the alias
grayImg = ImageGreyScale(myImage);
```

## See Also

* ImageInvert
* ImageBlur

## Notes

* The image can be passed as a BoxImage object or as a variable name referencing an image.
* Both `grayScale` and `greyScale` member methods are available for BoxImage objects.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://boxlang.ortusbooks.com/boxlang-framework/modularity/image-manipulation/reference/built-in-functions/imagegrayscale-imagegreyscale.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
