From 490bc2af2d83dbee8ebc1daeb971eeb788175151 Mon Sep 17 00:00:00 2001 From: wpferguson Date: Wed, 20 Jan 2021 20:50:15 -0500 Subject: [PATCH] added new dtutils library function find_image_by_id --- .../dtutils/find_image_by_id.md | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 content/lua.scripts.api.manual/dtutils/find_image_by_id.md diff --git a/content/lua.scripts.api.manual/dtutils/find_image_by_id.md b/content/lua.scripts.api.manual/dtutils/find_image_by_id.md new file mode 100644 index 0000000..6f1fd73 --- /dev/null +++ b/content/lua.scripts.api.manual/dtutils/find_image_by_id.md @@ -0,0 +1,31 @@ +--- +title: find_image_by_id +id: find_image_by_id +weight: 35 +draft: false +author: "people" +--- + +## NAME + +find_image_by_id + +## SYNOPSIS + +look up an image by ID in the database + +## USAGE +``` +local du = require "lib/dtutils" +local img = du.find_image_by_id(imgid) +``` +**imgid** - int - the image ID to retrieve + +## DESCRIPTION + +**find_image_by_id** looks up an image by ID in the database. + +## RETURN VALUE + +**img** - _[dt_lua_image_t](../../../lua.api.manual/types/dt_lua_image_t.md)_ - image with the given ID if found, nil if not +