This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 8ab5ac0d39286dd025fcc5df44db7d5530209899 (commit) via aa25e20587692884c085e045ce281be07d4b1518 (commit) via 7bab9abf175a1d8eea8e7570fdb77a24fa2b08ad (commit) from 65ca2dca576b0de212af87daf4b8ac069bc2967d (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/8ab5ac0d39286dd025fcc5df44db7d5530209...
commit 8ab5ac0d39286dd025fcc5df44db7d5530209899 Author: Cyril Hrubis metan@ucw.cz Date: Thu May 30 23:32:57 2013 +0200
loaders: BMP: Add support for RGB555.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/libs/loaders/GP_BMP.c b/libs/loaders/GP_BMP.c index 29ee503..ca2fe29 100644 --- a/libs/loaders/GP_BMP.c +++ b/libs/loaders/GP_BMP.c @@ -325,6 +325,10 @@ static GP_PixelType match_pixel_type(struct bitmap_info_header *header) case 8: case 24: return GP_PIXEL_RGB888; +#ifdef GP_PIXEL_RGB555 + case 16: + return GP_PIXEL_RGB555; +#endif }
return GP_PIXEL_UNKNOWN; @@ -446,13 +450,13 @@ static int read_palette(FILE *f, struct bitmap_info_header *header, return 0; }
-static int read_rgb888(FILE *f, struct bitmap_info_header *header, - GP_Context *context, GP_ProgressCallback *callback) +static int read_rgb(FILE *f, struct bitmap_info_header *header, + GP_Context *context, GP_ProgressCallback *callback) { - uint32_t row_size = 3 * header->w; + uint32_t row_size = header->w * (header->bpp / 8); int32_t y; int err; - + if ((err = seek_pixels_offset(header, f))) return err;
@@ -504,8 +508,11 @@ static int read_bitmap_pixels(FILE *f, struct bitmap_info_header *header, case 4: case 8: return read_palette(f, header, context, callback); +#ifdef GP_PIXEL_RGB555 + case 16: +#endif case 24: - return read_rgb888(f, header, context, callback); + return read_rgb(f, header, context, callback); }
return ENOSYS;
http://repo.or.cz/w/gfxprim.git/commit/aa25e20587692884c085e045ce281be07d4b1...
commit aa25e20587692884c085e045ce281be07d4b1518 Author: Cyril Hrubis metan@ucw.cz Date: Thu May 30 23:31:09 2013 +0200
gfxprim_config.py: Add RGB555.
This is needed to support 16 bit RGB BMP.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/gfxprim_config.py b/gfxprim_config.py index dad4bbe..ae32019 100644 --- a/gfxprim_config.py +++ b/gfxprim_config.py @@ -65,7 +65,12 @@ config = GfxPrimConfig( ('B', 16, 8), ('G', 8, 8), ('R', 0, 8)]), - + + PixelType(name='RGB555', pixelsize=PS_16BPP, chanslist=[ + ('R', 10, 5), + ('G', 5, 5), + ('B', 0, 5)]), + PixelType(name='RGB565', pixelsize=PS_16BPP, chanslist=[ ('R', 11, 5), ('G', 5, 6),
http://repo.or.cz/w/gfxprim.git/commit/7bab9abf175a1d8eea8e7570fdb77a24fa2b0...
commit 7bab9abf175a1d8eea8e7570fdb77a24fa2b08ad Author: Cyril Hrubis metan@ucw.cz Date: Thu May 30 23:29:06 2013 +0200
core: GP_Pixel.gen.h.t: Add #define GP_PIXEL_foo
So that we can use:
#ifdef GP_PIXEL_RGBA5551 ... #endif
for less common pixel types.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/include/core/GP_Pixel.gen.h.t b/include/core/GP_Pixel.gen.h.t index f0bddab..d6e7659 100644 --- a/include/core/GP_Pixel.gen.h.t +++ b/include/core/GP_Pixel.gen.h.t @@ -16,7 +16,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, * * Boston, MA 02110-1301 USA * * * - * Copyright (C) 2011 Tomas Gavenciak gavento@ucw.cz * + * Copyright (C) 2011 Tomas Gavenciak gavento@ucw.cz * + * Copyright (C) 2013 Cyril Hrubis metan@ucw.cz * * * *****************************************************************************/
@@ -40,6 +41,10 @@ typedef enum GP_PixelType { } GP_PixelType;
%% for pt in pixeltypes +#define GP_PIXEL_{{ pt.name }} GP_PIXEL_{{ pt.name }} +%% endfor + +%% for pt in pixeltypes %% if not pt.is_unknown() /* Automatically generated code for pixel type {{ pt.name }} *
-----------------------------------------------------------------------
Summary of changes: gfxprim_config.py | 7 ++++++- include/core/GP_Pixel.gen.h.t | 7 ++++++- libs/loaders/GP_BMP.c | 17 ++++++++++++----- 3 files changed, 24 insertions(+), 7 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.