> For the complete documentation index, see [llms.txt](https://portal-integracao.intelbras.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://portal-integracao.intelbras.com.br/linha-android/iaserver/ferramentas.md).

# Ferramentas

### LamyImageUtilsProxy

Classe de ferramenta de operação de imagem, imagem de suporte de acordo com corte de coordenadas, dados YUV rotação de mesclagem, conversão de formato de imagem

```java
/**
* rotate and combine yuv data into the specified byte[]
*
* @param yBytes y-component data
* @param vuBytes vu-component data
* @param width the width of the current yuv data
* @param height the height of the current yuv data
* @param rotate Angle of rotation
* @return The combined data
*/
public byte[] yuvToNv21(byte[] destBytes, byte[] yBytes, byte[] vuBytes, int width, int height, int rotate)

/**
* YUV data is processed in shared memory. yuv data is rotated and combined according to the specified
rotate and written into shared memory
*
* @param shareMemToken token of shared memory
* @param yBytes y-component data
* @param vuBytes vu-component data
* @param width the width of the current yuv data
* @param height the height of the current yuv data
* @param rotate the angle of rotation
* @return The combined data
*/
public boolean yuvToNv21(int shareMemToken, byte[] yBytes, byte[] vuBytes, int width, int height, int rotate)

/**
* rotate and combine yuv data into the specified byte[]
*
* @param yBytes y-component data
* @param vuBytes vu-component data
* @param width the width of the current yuv data
* @param height the height of the current yuv data
* @param rotate Angle of rotation
* @return The combined data
*/
public byte[] yuvToNv21(ByteBuffer yBytes, ByteBuffer vuBytes, int width, int height, int rotate)

/**
* Crop the image according to the specified coordinates
*
* @param yvuBytes yuv data
* @param width the width of the current yuv data
* @param height the height of the current yuv data
* @param left The left coordinate of the clipping area
* @param top The top coordinate of the clipping area
* @param right The right coordinate of the clipping area
* @param bottom The bottom coordinate of the clipping area
* @return Cropped image in jpeg format
*/
public byte[] cropAndEncodeImageWithBuffer(byte[] yvuBytes, int width, int height, int left, int top, int right, int bottom)

/**
* Uses shared memory mode to crop the image according to the specified coordinates
*
* @param token A shared memory Token for storing image data
* @param yvuBytes yuv data
* @param width the width of the current yuv data
* @param height the height of the current yuv data
* @param left The left coordinate of the clipping area
* @param top The top coordinate of the clipping area
* @param right The right coordinate of the clipping area
* @param bottom The bottom coordinate of the clipping area
* @return Cropped image in jpeg format
*/
public byte[] cropAndEncodeImageWithShareMem(int token, int width, int height, int left, int top, int right, int bottom)

/**
* Convert images to YUV data in Bmp,jpg,png, and other formats
*
* @param imageBytes image file path
* @return yuv data
*/
public YuvDataInfo image2Nv21(byte[] imageBytes)

/**
* Convert images to YUV data in Bmp,jpg,png, and other format
*
* @param imagePath image data
* @return yuv data
*/
public YuvDataInfo image2Nv21(String imagePath)

```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://portal-integracao.intelbras.com.br/linha-android/iaserver/ferramentas.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
