Some work on pixel formats

This commit is contained in:
Joshua Granick
2015-05-04 15:54:50 -07:00
parent ddd77134d2
commit 2b75564951
13 changed files with 270 additions and 8 deletions

View File

@@ -3,6 +3,7 @@
#include <hx/CFFI.h>
#include <graphics/PixelFormat.h>
#include <utils/ByteArray.h>
@@ -24,6 +25,7 @@ namespace lime {
int bpp;
ByteArray *data;
PixelFormat format;
int height;
int width;
bool transparent;

View File

@@ -8,7 +8,8 @@ namespace lime {
enum PixelFormat {
RGBA,
ARGB
ARGB,
BGRA
};

View File

@@ -29,6 +29,7 @@ namespace lime {
static void Merge (Image* image, Image* sourceImage, Rectangle* sourceRect, Vector2* destPoint, int redMultiplier, int greenMultiplier, int blueMultiplier, int alphaMultiplier);
static void MultiplyAlpha (Image* image);
static void Resize (Image* image, ImageBuffer* buffer, int width, int height);
static void SetFormat (Image* image, PixelFormat format);
static void SetPixels (Image* image, Rectangle* rect, ByteArray* bytes, PixelFormat format);
static void UnmultiplyAlpha (Image* image);