---
name: "SDL_GetSurfaceProperties"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GetSurfaceProperties"
---

# SDL\_GetSurfaceProperties(3)

Get the properties associated with a surface.

## NAME

SDL\_GetSurfaceProperties - Get the properties associated with a surface.

## HEADER FILE

Defined in SDL3/SDL\_surface.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**SDL\_PropertiesID SDL\_GetSurfaceProperties(SDL\_Surface \*surface);**

## DESCRIPTION

The following properties are understood by SDL:

•  **SDL\_PROP\_SURFACE\_SDR\_WHITE\_POINT\_FLOAT** :\
   for HDR10 and floating point surfaces, this defines the value of 100%\
   diffuse white, with higher values being displayed in the High Dynamic\
   Range headroom. This defaults to 203 for HDR10 surfaces and 1.0 for\
   floating point surfaces.

•  **SDL\_PROP\_SURFACE\_HDR\_HEADROOM\_FLOAT** :\
   for HDR10 and floating point surfaces, this defines the maximum dynamic\
   range used by the content, in terms of the SDR white point. This defaults\
   to 0.0, which disables tone mapping.

•  **SDL\_PROP\_SURFACE\_TONEMAP\_OPERATOR\_STRING** :\
   the tone mapping operator used when compressing from a surface with high\
   dynamic range to another with lower dynamic range. Currently this\
   supports "chrome", which uses the same tone mapping that Chrome uses for\
   HDR content, the form "\*=N", where N is a floating point scale factor\
   applied in linear space, and "none", which disables tone mapping. This\
   defaults to "chrome".

•  **SDL\_PROP\_SURFACE\_HOTSPOT\_X\_NUMBER** :\
   the hotspot pixel offset from the left edge of the image, if this surface\
   is being used as a cursor.

•  **SDL\_PROP\_SURFACE\_HOTSPOT\_Y\_NUMBER** :\
   the hotspot pixel offset from the top edge of the image, if this surface\
   is being used as a cursor.

## FUNCTION PARAMETERS

- *surface*

  the  **SDL\_Surface**\
    structure to query.

## RETURN VALUE

( **SDL\_PropertiesID** ) Returns a valid property ID on success or 0 on failure; call  **SDL\_GetError** () for more information.

## THREAD SAFETY

It is safe to call this function from any thread.

## AVAILABILITY

This function is available since SDL 3.2.0.
