Home / Lua API Manual / darktable / darktable.gui / darktable.gui.libs / darktable.gui.libs.image
< darktable.gui.libs.history
darktable.gui.libs.import >

# darktable.gui.libs.image

The UI element that manipulates the current images

Attributes:

- has_tostring
- parent : types.dt_lua_lib_t

## 🔗darktable.gui.libs.image.register_action

    function(
      label : string,
      callback : function,
      [tooltip : string]
    )

Add a new button and call a callback when it is clicked

- label - string - The label to display on the button
- callback - function - The function to call when the button is pressed
- [tooltip] - string - The tooltip to use on the new button

callback -

    function(
      event : string,
      images : table oftypes.dt_lua_image_t
    )

The function to call when the button is pressed

- event - string - The name of the button that was pressed
- images - table of types.dt_lua_image_t - The images to act on when the button was clicked

< darktable.gui.libs.history
darktable.gui.libs.import >