forked from enlightenment/efl
for shits and giggles... i wrote a bmp loader. i did look at the old
imlib2 bmp loader, but it was imcomplete compared to the bmp standards, so i actually ended up reading the file format definitions on line i could find and using lots of test images... wrote a new one. you can at least view bmp files now. note - i found 1 bmp file that claims to have an alpha channel (amask is non-empty) and then proceeds to provide an image with pixels - all alpha 0. so its transparent when it shouldnt be. beats me but looks like a broken bmp file to me when it compes to specs. SVN revision: 49324
This commit is contained in:
parent
ca1a90eeee
commit
6f6730eaf8
|
@ -117,6 +117,7 @@ want_evas_image_loader_png="yes"
|
|||
want_evas_image_loader_svg="yes"
|
||||
want_evas_image_loader_tiff="yes"
|
||||
want_evas_image_loader_xpm="yes"
|
||||
want_evas_image_loader_bmp="yes"
|
||||
|
||||
want_evas_font_loader_eet="yes"
|
||||
|
||||
|
@ -692,6 +693,8 @@ EVAS_CHECK_IMAGE_LOADER([Tiff], [${want_evas_image_loader_tiff}])
|
|||
|
||||
EVAS_CHECK_IMAGE_LOADER([XPM], [${want_evas_image_loader_xpm}])
|
||||
|
||||
EVAS_CHECK_IMAGE_LOADER([BMP], [${want_evas_image_loader_bmp}])
|
||||
|
||||
|
||||
#####################################################################
|
||||
## Cpu based optimizations
|
||||
|
@ -1406,6 +1409,7 @@ src/modules/loaders/jpeg/Makefile
|
|||
src/modules/loaders/png/Makefile
|
||||
src/modules/loaders/tiff/Makefile
|
||||
src/modules/loaders/xpm/Makefile
|
||||
src/modules/loaders/bmp/Makefile
|
||||
src/modules/loaders/svg/Makefile
|
||||
src/modules/loaders/pmaps/Makefile
|
||||
src/modules/savers/Makefile
|
||||
|
@ -1483,6 +1487,7 @@ echo " PNG.....................: $have_evas_image_loader_png"
|
|||
echo " SVG.....................: $have_evas_image_loader_svg"
|
||||
echo " TIFF....................: $have_evas_image_loader_tiff"
|
||||
echo " XPM.....................: $have_evas_image_loader_xpm"
|
||||
echo " BMP.....................: $have_evas_image_loader_bmp"
|
||||
# FIXME: need to add modular image loader system
|
||||
# FIXME: add more image loader modules
|
||||
echo
|
||||
|
|
|
@ -307,6 +307,26 @@ fi
|
|||
|
||||
])
|
||||
|
||||
dnl use: EVAS_CHECK_LOADER_DEP_BMP(loader, want_static[, ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
||||
|
||||
AC_DEFUN([EVAS_CHECK_LOADER_DEP_BMP],
|
||||
[
|
||||
|
||||
have_dep="yes"
|
||||
evas_image_loader_[]$1[]_cflags=""
|
||||
evas_image_loader_[]$1[]_libs=""
|
||||
|
||||
AC_SUBST([evas_image_loader_$1_cflags])
|
||||
AC_SUBST([evas_image_loader_$1_libs])
|
||||
|
||||
if test "x${have_dep}" = "xyes" ; then
|
||||
m4_default([$3], [:])
|
||||
else
|
||||
m4_default([$4], [:])
|
||||
fi
|
||||
|
||||
])
|
||||
|
||||
dnl use: EVAS_CHECK_IMAGE_LOADER(loader, want_loader, macro)
|
||||
|
||||
|
||||
|
|
|
@ -6,12 +6,14 @@
|
|||
#include "evas_private.h"
|
||||
#include "evas_cs.h"
|
||||
|
||||
struct ext_loader_s {
|
||||
const char* extention;
|
||||
const char* loader;
|
||||
struct ext_loader_s
|
||||
{
|
||||
const char *extention;
|
||||
const char *loader;
|
||||
};
|
||||
|
||||
static struct ext_loader_s const loaders[] = {
|
||||
static const struct ext_loader_s loaders[] =
|
||||
{
|
||||
{ "png", "png" },
|
||||
{ "jpg", "jpeg" },
|
||||
{ "jpeg", "jpeg" },
|
||||
|
@ -29,11 +31,13 @@ static struct ext_loader_s const loaders[] = {
|
|||
{ "pbm", "pmaps" },
|
||||
{ "pgm", "pmaps" },
|
||||
{ "ppm", "pmaps" },
|
||||
{ "pnm", "pmaps" }
|
||||
{ "pnm", "pmaps" },
|
||||
{ "bmp", "bmp" }
|
||||
};
|
||||
|
||||
static const char *loaders_name[] = {
|
||||
"png", "jpeg", "eet", "xpm", "tiff", "gif", "svg", "pmaps", "edb"
|
||||
static const char *loaders_name[] =
|
||||
{
|
||||
"png", "jpeg", "eet", "xpm", "tiff", "gif", "svg", "pmaps", "edb", "bmp"
|
||||
};
|
||||
|
||||
struct evas_image_foreach_loader_data
|
||||
|
|
|
@ -56,3 +56,9 @@ SUBDIRS += xpm
|
|||
endif
|
||||
endif
|
||||
|
||||
if BUILD_LOADER_BMP
|
||||
if !EVAS_STATIC_BUILD_BMP
|
||||
SUBDIRS += bmp
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I. \
|
||||
-I$(top_srcdir)/src/lib \
|
||||
-I$(top_srcdir)/src/lib/include \
|
||||
@FREETYPE_CFLAGS@ \
|
||||
@EINA_CFLAGS@ \
|
||||
@EVIL_CFLAGS@ \
|
||||
@WIN32_CPPFLAGS@
|
||||
|
||||
if BUILD_LOADER_BMP
|
||||
if !EVAS_STATIC_BUILD_BMP
|
||||
|
||||
pkgdir = $(libdir)/evas/modules/loaders/bmp/$(MODULE_ARCH)
|
||||
pkg_LTLIBRARIES = module.la
|
||||
|
||||
module_la_SOURCES = evas_image_load_bmp.c
|
||||
|
||||
module_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@ $(top_builddir)/src/lib/libevas.la
|
||||
module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
|
||||
module_la_LIBTOOLFLAGS = --tag=disable-static
|
||||
|
||||
else
|
||||
|
||||
noinst_LTLIBRARIES = libevas_loader_bmp.la
|
||||
libevas_loader_png_la_SOURCES = evas_image_load_bmp.c
|
||||
libevas_loader_png_la_LIBADD =
|
||||
|
||||
endif
|
||||
endif
|
File diff suppressed because it is too large
Load Diff
|
@ -18,7 +18,7 @@
|
|||
#ifdef _WIN32_WCE
|
||||
# define E_FOPEN(file, mode) evil_fopen_native((file), (mode))
|
||||
# define E_FREAD(buffer, size, count, stream) evil_fread_native(buffer, size, count, stream)
|
||||
# define E_FCLOSE(stream) evil_fclose_native(stream)
|
||||
# define/ E_FCLOSE(stream) evil_fclose_native(stream)
|
||||
#else
|
||||
# define E_FOPEN(file, mode) fopen((file), (mode))
|
||||
# define E_FREAD(buffer, size, count, stream) fread(buffer, size, count, stream)
|
||||
|
|
Loading…
Reference in New Issue