1#ifndef COASTLINE_PLATFORM_WIN_GLIDE_RGB565IMAGE_H
2#define COASTLINE_PLATFORM_WIN_GLIDE_RGB565IMAGE_H
43 uint16_t *destination,
const uint8_t *source,
int width,
int height,
int sourceStride);
56#define RGB565_BLIT_COLOR_KEYED 0x1
86 int destinationStride,
102 int destinationStride,
105 const uint16_t *source,
void SetRgb565ImageColorKey(Rgb565Image *image, COLORREF color)
Convert a Windows RGB colour to the image's RGB 565 transparency key.
Rgb565Image * LoadBitmapToRgb565Image(const char *name, int width, int height)
Load a bitmap resource or file at the requested dimensions and convert it to RGB 565.
Rgb565Image * CreateRgb565Image(int width, int height)
Allocate an RGB 565 image and an uninitialised pixel buffer.
Rgb565Image * CreateRgb565ImageFromBitmap(const BITMAP *bitmap)
Convert a 24-bit Windows bitmap to an RGB 565 image.
void ConvertBgr24ToRgb565FlipVertical(uint16_t *destination, const uint8_t *source, int width, int height, int sourceStride)
Convert 24-bit BGR rows to RGB 565 while reversing their vertical order.
void WriteRgb565ImageToGlideLfb(const Rgb565Image *image)
Write an image to the back buffer of Glide at its top left.
void FreeRgb565Image(Rgb565Image *image)
Free image and its pixel buffer, accepting NULL.
void CopyRgb565RectColorKeyed(uint16_t *destination, int destinationStride, int width, int height, const uint16_t *source, int sourceStride, uint16_t colorKey)
Copy RGB 565 rows, omitting source pixels equal to colorKey.
void BlitRgb565ImageRegion(Rgb565Image *destination, unsigned x, unsigned y, const Rgb565Image *source, const RECT *rect, DWORD flags)
Copy a rectangle of an image into another at a position, clipped to the right and bottom edges of the...
void CopyRgb565Rect(void *destination, int destinationStride, unsigned width, int height, const void *source, int sourceStride)
Copy RGB 565 rows without clipping or interpreting colour keys.
A bitmap of RGB 565 pixels with a transparent colour key.
Definition rgb565image.h:19
int height
Definition rgb565image.h:22
uint16_t colorKey
Definition rgb565image.h:23
int width
Definition rgb565image.h:21
uint16_t * pixels
Definition rgb565image.h:20