diff options
author | Kim Woelders <kim@woelders.dk> | 2021-12-06 07:04:06 +0100 |
---|---|---|
committer | Kim Woelders <kim@woelders.dk> | 2021-12-06 07:08:06 +0100 |
commit | 1216f116869cc15a4f0bf1e8a30f0994a7d55b7e (patch) | |
tree | d5638295a3dbe004719eb4a8306596d58b2725bb | |
parent | 273a7aaac34d12670f6249f575e6b703494eff30 (diff) | |
download | imlib2-1216f116869cc15a4f0bf1e8a30f0994a7d55b7e.tar.gz |
Update doc for imlib_load_image_fd()
-rw-r--r-- | doc/index.html | 11 | ||||
-rw-r--r-- | src/lib/api.c | 11 |
2 files changed, 18 insertions, 4 deletions
diff --git a/doc/index.html b/doc/index.html index 649baf2..3bcd4ee 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1069,6 +1069,17 @@ an image handle on success or NULL on failure.</blockquote> it returns a valid image handle, if not NULL is returned and the error_return pointed to is set to the detail of the error.</blockquote> +<b><tt><font color="#660000"><font size=+2>Imlib_Image imlib_load_image_fd(int fd, const char *file);</font></font></tt></b> + +<blockquote>Reads image from file descriptor. +The image is loaded without deferred image data decoding (i.e. it is +decoded straight away) and without looking in the cache. +The file name is only used to guess the file format. +fd must be mmap'able (so it cannot be a pipe). +fd will be closed after calling this function. +Returns an image handle on success or NULL on failure. +</blockquote> + <b><tt><font color="#660000"><font size=+2>void imlib_free_image(void);</font></font></tt></b> <blockquote>This frees the image that is set as the current image in Imlib2's diff --git a/src/lib/api.c b/src/lib/api.c index 9bf16df..149bdfb 100644 --- a/src/lib/api.c +++ b/src/lib/api.c @@ -1389,10 +1389,13 @@ imlib_load_image_immediately_without_cache(const char *file) * @param file Image file. * @return An image handle. * - * Loads the image without deferred image data decoding (i.e. it is - * decoded straight away) and without looking in the cache. Returns an - * image handle on success or NULL on failure. - * fd will be closed after calling this function. + * Reaasd image from file descriptor. + * The file name @file is only used to guess the file format. + * The image is loaded without deferred image data decoding (i.e. it is + * decoded straight away) and without looking in the cache. + * @fd must be mmap'able (so it cannot be a pipe). + * @fd will be closed after calling this function. + * Returns an image handle on success or NULL on failure. */ EAPI Imlib_Image imlib_load_image_fd(int fd, const char *file) |