From 7ba6529191dbc21336b3484150c2489f706c6d07 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Mon, 24 Sep 2001 21:11:53 +0000 Subject: [PATCH] working offline... :) SVN revision: 5370 --- configure.ac | 14 ++++++-------- imlib2.spec.in | 15 +++------------ loaders/loader_bmp.c | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 20 deletions(-) diff --git a/configure.ac b/configure.ac index 445170a..477fa57 100644 --- a/configure.ac +++ b/configure.ac @@ -1,8 +1,7 @@ dnl Process this file with autoconf to create configure. -AC_INIT -AC_CONFIG_SRCDIR([src/Imlib2.h]) -AC_CANONICAL_TARGET([]) +AC_INIT(src/Imlib2.h) +AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE(imlib2, 1.0.4) AM_CONFIG_HEADER(config.h) @@ -302,11 +301,10 @@ AC_SUBST(x_ldflags) AC_SUBST(x_libs) AC_SUBST(dlopen_libs) -AC_CONFIG_FILES([imlib2-config Makefile loaders/Makefile src/Makefile test/Makefile \ +AC_OUTPUT(imlib2-config Makefile loaders/Makefile src/Makefile test/Makefile \ filters/Makefile demo/Makefile doc/Makefile imlib2.spec \ - ]) -AC_CONFIG_COMMANDS([default],[[ + , +[ test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h; chmod +x imlib2-config -]],[[]]) -AC_OUTPUT +]) diff --git a/imlib2.spec.in b/imlib2.spec.in index aec38d8..461aedd 100644 --- a/imlib2.spec.in +++ b/imlib2.spec.in @@ -12,7 +12,6 @@ Requires: freetype Requires: XFree86 BuildRequires: libjpeg-devel BuildRequires: libpng-devel -BuildRequires: edb-devel >= 1.0.2 BuildRequires: XFree86-devel BuildRequires: freetype-devel @@ -54,14 +53,6 @@ BuildRequires: zlib-devel %description loader_png PNG image loader/saver for Imlib2 -%package loader_db -Summary: Imlib2 DB loader -Group: System/Libraries -Requires: edb >= 1.0.2 -BuildRequires: edb-devel >= 1.0.2 -%description loader_db -DB image loader/saver for Imlib2 - %package loader_argb Summary: Imlib2 ARGB loader Group: System/Libraries @@ -165,9 +156,6 @@ rm -rf $RPM_BUILD_ROOT %files loader_png %attr(755,root,root) %{_libdir}/loaders/image/png.* -%files loader_db -%attr(755,root,root) %{_libdir}/loaders/image/db.* - %files loader_argb %attr(755,root,root) %{_libdir}/loaders/image/argb.* @@ -190,6 +178,9 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_libdir}/loaders/image/xpm.* %changelog +* Tue Aug 28 2001 Alvaro Herrera +- Remove loader_db since it's included in a different package. + * Mon Jan 8 2001 The Rasterman - Fix Requires & BuildRequires for freetype. diff --git a/loaders/loader_bmp.c b/loaders/loader_bmp.c index 5f9b1ef..71fe5dd 100644 --- a/loaders/loader_bmp.c +++ b/loaders/loader_bmp.c @@ -205,6 +205,42 @@ load (ImlibImage *im, ImlibProgressFunction progress, data_end = im->data + w * h; ptr = im->data + ((h - 1) * w); + if (bitcount == 1) { + if (comp == BI_RGB) { + skip = ((((w + 31) / 32) * 32) - w) / 8; + for (y = 0; y < h; y++) { + for (x = 0; x < w && buffer_ptr < buffer_end; x++) { + if ((x & 7) == 0) byte = *(buffer_ptr++); + k = (byte >> 7) & 1; + *ptr++ = 0xff000000 | + (rgbQuads[k].rgbRed << 16) | + (rgbQuads[k].rgbGreen << 8) | + rgbQuads[k].rgbBlue; + byte <<= 1; + } + buffer_ptr += skip; + ptr -= w * 2; + if (progress) { + char per; + int l; + + per = (char)((100 * y) / im->h); + if (((per - pper) >= progress_granularity) || + (y == (im->h - 1))) + { + l = y - pl; + if(!progress(im, per, 0, im->h - y - 1, im->w, im->h - y + l)) + { + free(buffer); + return 2; + } + pper = per; + pl = y; + } + } + } + } + } if (bitcount == 4) { if (comp == BI_RLE4) { x = 0;