diff options
author | tegzed <tegzed@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-01-05 14:18:18 +0000 |
---|---|---|
committer | tegzed <tegzed@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-01-05 14:18:18 +0000 |
commit | 53399f128682503b86ddf1199e05497024b7b915 (patch) | |
tree | 609d3463f82657fcb0abe784dd2ee61d8f1d1d99 | |
parent | 4caa294b8eda5cafece3e8b6bc64ece9ba656648 (diff) | |
download | navit-53399f128682503b86ddf1199e05497024b7b915.tar.gz |
Add:graphics/opengl:Added support for 64 bit per pixel image handling
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@3865 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r-- | navit/graphics/opengl/graphics_opengl.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/navit/graphics/opengl/graphics_opengl.c b/navit/graphics/opengl/graphics_opengl.c index 0e5c0049f..8bd06691b 100644 --- a/navit/graphics/opengl/graphics_opengl.c +++ b/navit/graphics/opengl/graphics_opengl.c @@ -339,6 +339,14 @@ image_new (struct graphics_priv *gr, struct graphics_image_methods *meth, g_hash_table_insert(hImageData,g_strdup(path),&image_error); return NULL; } + + if (FreeImage_GetBPP (image) == 64) { + FIBITMAP *image2; + image2 = FreeImage_ConvertTo32Bits(image); + FreeImage_Unload(image); + image = image2; + } + gi = g_new0 (struct graphics_image_priv, 1); width = FreeImage_GetWidth (image); @@ -380,12 +388,6 @@ image_new (struct graphics_priv *gr, struct graphics_image_methods *meth, data[4 * width * i + 4 * j + 3] = transparent ? 0 : 255; } - else if (FreeImage_GetBPP (image) == 64) - { - //FreeImage_GetPixelColor does not handle 64bits/pixel images correctly - g_hash_table_insert(hImageData,g_strdup(path),&image_error); - return NULL; - } } } |