---
id: object/codeunit/3971
type: object
title: Codeunit 3971 "Image"
summary: Codeunit 3971 "Image" in System Application (System.Utilities). 15 public procedures. Present since at least BC23, still in BC30.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: null
  last_changed: null
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: ec58f922f6d0ea32c7f620b18f1bf7005d8bd75882570217433adb7fb0a4ee59
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Image/src/Image.Codeunit.al
    title: src/System Application/App/Image/src/Image.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: codeunit
object_id: 3971
name: Image
namespace: System.Utilities
app: System Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in: []
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 15
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 1
  implements: 0
---

# Codeunit 3971 "Image"

> Codeunit 3971 "Image" in System Application (System.Utilities). 15 public procedures. Present since at least BC23, still in BC30.

System Application · System.Utilities · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/Image/src/Image.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Public |

## Procedures

- `Clear(Alpha: Integer; Red: Integer; Green: Integer; Blue: Integer)`: Clears the entire drawing surface and fills it with the specified background color.
- `Clear(Red: Integer; Green: Integer; Blue: Integer)`: Clears the entire drawing surface and fills it with the specified background color.
- `Crop(X: Integer; Y: Integer; Width: Integer; Height: Integer)`: Crops the image based on a rectangle specified by the user. The resulting crop will be a hole-cut in the image made by the rectangle.
- `GetFormatAsText(): Text`: Gets the image format as a text.
- `GetFormat(): Enum "Image Format"`: Gets the image format as an Enum "Image Format".
- `SetFormat(ImageFormat: Enum "Image Format")`: Sets the image format from an Enum "Image Format".
- `FromBase64(Base64Text: Text)`: Creates an Image from base64 encoding.
- `FromStream(InStream: InStream)`: Creates an image from the specified data stream.
- `GetWidth(): Integer`: Gets the width in pixels.
- `GetHeight(): Integer`: Gets the height in pixels.
- `Resize(Width: Integer; Height: Integer)`: Resizes the Image to the specified size.
- `RotateFlip(RotateFlipType: Enum "Rotate Flip Type")`: Rotates, flips, or rotates and flips the image.
- `Save(OutStream: OutStream)`: Saves the image to the specified stream in the specified format.
- `ToBase64(): Text`: Convert the image to a base64 encoded string.
- `GetRotateFlipType(): Enum "Rotate Flip Type"`: Gets the image rotation flip type.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 3970 "Image Impl."](../codeunit/3970.md) (14 calls: `Clear → Clear`, `Crop → Crop`, `FromBase64 → FromBase64`, …)

## Called by

- [Codeunit 4112 "Image Helpers"](../codeunit/4112.md) (4 calls: `GetHTMLImgSrc → GetFormatAsText`, `GetHTMLImgSrc → ToBase64`, `GetImageType → GetFormatAsText`, …)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: none

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "Image")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
