---
title: "Picture (_Picture class)"
canonical: "https://docs.cuesystem.com/space/CVCHELP/518881401/Picture%20(_Picture%20class)"
format: markdown
---
> Macro (toc)

---

# ExportToPNG

This function exports picture to the PNG file.

#### Syntax

```visualbasic
Function ExportToPNG(filename As Text) As Boolean
```

#### Parameters

filename

<u>[Text](/wiki/spaces/CVCHELP/pages/495058958/Data+types#Text)</u> as the destination filename for the PNG picture. The filename must match the <u>[rules of names](/wiki/spaces/CVCHELP/pages/512983041/Files+folders#Names-of-files-and-folders)</u>.

#### Return value

<u>[Boolean](/wiki/spaces/CVCHELP/pages/495058958/Data+types#Boolean)</u> It is True on success or False if an error occurs. The function <u>[GetLastError](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#GetLastError)</u> returns the error number.

#### Example

```visualbasic
picBackground.ExportToPNG("/filestorage/Background.png")
```

# GetHeight

This function returns a height of a picture in pixels.

#### Syntax

```visualbasic
Function GetHeight() As Long
```

#### Return value

<u>[Long](/wiki/spaces/CVCHELP/pages/495058958/Data+types#Long)</u> It is the height of the picture in pixels.

# GetPixel

This function fills a parameter pixelcolor by the color and opacity of one image point. The function returns True if the returned values are in order. Otherwise False if an error occurred (e.g., coordinates out of range).

#### Syntax

```visualbasic
Function GetPixel( 
  x As Long,
  y As Long,
  ByRef pixelcolor As Long)
As Boolean
```

#### Parameters

x

<u>[Long](/wiki/spaces/CVCHELP/pages/495058958/Data+types#Long)</u> It is the x coordinate.

y

<u>[Long](/wiki/spaces/CVCHELP/pages/495058958/Data+types#Long)</u> It is the y coordinate.

pixelcolor

<u>[Long](/wiki/spaces/CVCHELP/pages/495058958/Data+types#Long)</u> It is the color number.

#### Return value

<u>[Boolean](/wiki/spaces/CVCHELP/pages/495058958/Data+types#Boolean)</u> It is True on success or False if an error occurs. The function <u>[GetLastError](/wiki/spaces/CVCHELP/pages/510525445/Command+errors#GetLastError)</u> returns the error number.

# GetWidth

This function returns the width of a picture in pixels.

#### Syntax

```visualbasic
Function GetWidth() As Long
```

#### Return value

<u>[Long](/wiki/spaces/CVCHELP/pages/495058958/Data+types#Long)</u> It is the width of the picture in pixels.