# Image Conversion

## convertImage

> Convert a given image to another format.

```json
{"openapi":"3.0.0","info":{"title":"Intelligence API","version":"1.2.0"},"servers":[{"url":"http://localhost:8083/gbs-intelligence-server/service"}],"paths":{"/image/convert":{"post":{"description":"Convert a given image to another format.","tags":["image-conversion"],"operationId":"convertImage","summary":"convertImage","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageBean"}}}},"responses":{"200":{"description":"Convert image ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageResponse"}}}},"400":{"description":"Parameters validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"System error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"ImageBean":{"type":"object","properties":{"buffer":{"type":"array","items":{"type":"string","format":"byte"}},"originalFormat":{"type":"string","enum":["RAW","RGB","BMP","BMP24BITS","GIF","JPEG","JPEG2000","PNG","TIFF","WSQ"]},"toFormat":{"type":"string","enum":["RAW","RGB","BMP","BMP24BITS","GIF","JPEG","JPEG2000","PNG","TIFF","WSQ"]},"resolution":{"description":"Resolution of the original image","type":"integer","format":"int32"}}},"ImageResponse":{"type":"object","properties":{"status":{"type":"string","enum":["OK","ERROR","BAD_REQUEST","CREATED","NO_CONTENT","DELETED","CANCELLED","CLOSED","REMOVED","NOT_FOUND","AUTHENTICATION_FAILED","AUTHENTICATION_OK","INVALID_SESSION_GUID","UNAUTHORIZED","FORBIDDEN","RECEIVED","ACCEPTED","ENQUEUED","INVALID_PARAMETERS","FIELD_VALIDATION_ERROR","ILLEGAL_STATE","NOT_ENOUGH_DATA","VALIDATION_ERROR","IMPORTED","UPDATED","IGNORED","SERVICE_STARTED","SERVICE_CANCELLED","SERVICE_SUBMITTED"]},"code":{"type":"integer","format":"int32"},"image":{"$ref":"#/components/schemas/ImageBean"}}},"ErrorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["OK","ERROR","BAD_REQUEST","CREATED","NO_CONTENT","DELETED","CANCELLED","CLOSED","REMOVED","NOT_FOUND","AUTHENTICATION_FAILED","AUTHENTICATION_OK","INVALID_SESSION_GUID","UNAUTHORIZED","FORBIDDEN","RECEIVED","ACCEPTED","ENQUEUED","INVALID_PARAMETERS","FIELD_VALIDATION_ERROR","ILLEGAL_STATE","NOT_ENOUGH_DATA","VALIDATION_ERROR","IMPORTED","UPDATED","IGNORED","SERVICE_STARTED","SERVICE_CANCELLED","SERVICE_SUBMITTED"]},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"validValues":{"type":"array","items":{"type":"object"}},"componentId":{"type":"string"},"fieldValidationErrors":{"type":"array","items":{"type":"object"}},"searchStatusDetail":{"type":"string"},"errorCode":{"type":"string","enum":["EXCEPTION_ALREADY_TREATED"]}}}}}}
```
