summaryrefslogtreecommitdiff
path: root/include/netsurf
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2022-06-14 09:45:57 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2022-06-14 09:45:57 +0100
commit8b7bbb415828c72ba1719d7ed210772ff7cc4dc8 (patch)
tree70f01e22611886038deec3f343eaad360869ea67 /include/netsurf
parent1577d000501894217f59da389f9c08f2d8566f42 (diff)
downloadnetsurf-8b7bbb415828c72ba1719d7ed210772ff7cc4dc8.tar.gz
netsurf-8b7bbb415828c72ba1719d7ed210772ff7cc4dc8.tar.bz2
Bitmap: Remove misleading format documentation.
Diffstat (limited to 'include/netsurf')
-rw-r--r--include/netsurf/bitmap.h32
1 files changed, 5 insertions, 27 deletions
diff --git a/include/netsurf/bitmap.h b/include/netsurf/bitmap.h
index 25923da5c..10e9a07fb 100644
--- a/include/netsurf/bitmap.h
+++ b/include/netsurf/bitmap.h
@@ -20,35 +20,13 @@
* \file
* Generic bitmap handling interface.
*
- * This interface wraps the native platform-specific image format, so that
- * portable image convertors can be written.
+ * This interface wraps the native platform-specific image format.
*
- * Bitmaps are required to be 32bpp with components in the order RR GG BB AA.
+ * Bitmaps are required to be 32bpp with 8-bit components. The components are
+ * red, green, blue, and alpha, in client specified order.
*
- * For example, an opaque 1x1 pixel image would yield the following bitmap
- * data:
- *
- * > Red : 0xff 0x00 0x00 0x00
- * > Green: 0x00 0xff 0x00 0x00
- * > Blue : 0x00 0x00 0xff 0x00
- *
- * Any attempt to read pixels by casting bitmap data to uint32_t or similar
- * will need to cater for the order of bytes in a word being different on
- * big and little endian systems. To avoid confusion, it is recommended
- * that pixel data is loaded as follows:
- *
- * uint32_t read_pixel(const uint8_t *bmp)
- * {
- * // red green blue alpha
- * return bmp[0] | (bmp[1] << 8) | (bmp[2] << 16) | (bmp[3] << 24);
- * }
- *
- * and *not* as follows:
- *
- * uint32_t read_pixel(const uint8_t *bmp)
- * {
- * return *((uint32_t *) bmp);
- * }
+ * The component order may be set in the front ends by calling
+ * \ref bitmap_set_format().
*/
#ifndef _NETSURF_BITMAP_H_