Commit Graph

1558 Commits

Author SHA1 Message Date
Kim Woelders a40971035e FF loader: Use mmap() for loading 2021-10-22 19:27:47 +02:00
Kim Woelders c4e4741cc8 FF loader: Cosmetics 2021-10-22 19:27:47 +02:00
Kim Woelders 51999ad031 WEBP loader: Use mmap() for loading 2021-10-22 19:27:47 +02:00
Kim Woelders 546bb20f52 WEBP loader: Cosmetics
Some variable renaming for consistency.
2021-10-22 19:27:47 +02:00
Kim Woelders b7b72ce0b5 TGA loader: Use im->fsize, cosmetics, debug 2021-10-22 19:27:47 +02:00
Kim Woelders 66c941c267 TIFF loader: Use mmap() during signature check 2021-10-22 19:27:47 +02:00
Kim Woelders 07deb8c893 PNG loader: Use mmap() during signature check 2021-10-22 19:27:47 +02:00
Kim Woelders df050d2dbc PNG loader: Cosmetics 2021-10-22 19:27:47 +02:00
Kim Woelders ae01ddf0b2 Introduce im->fsize 2021-10-22 19:27:47 +02:00
Kim Woelders 9996028e7d debug: Add some debug related to file access and image loading 2021-10-22 19:26:58 +02:00
Kim Woelders e47e32a247 debug: Infrastructure
Add some debug infrastructure.
Disabled by default, enable with --enable-debug.
When enabled, the environment variable IMLIB2_DEBUG controls the amount
of debug output.
2021-10-22 19:24:15 +02:00
Kim Woelders 5a2490eb7f imlib2_load: Use clock_gettime() when available 2021-10-22 15:41:44 +02:00
Kim Woelders e3a2bd5fa6 imlib2_view: If verbose show error message on failure 2021-10-19 09:19:37 +02:00
Kim Woelders 81b4e7b56b test: Add test_load_2
Checking signature (CRC) of loaded images.
2021-10-18 19:33:25 +02:00
Kim Woelders 579b1b3366 test: Add icon-64.pbm 2021-10-16 20:46:49 +02:00
Kim Woelders 4e15a7974c Fix build (Imlib2.h is now built) 2021-10-08 19:43:14 +02:00
Kim Woelders 675d0084f8 imlib2_load: Add verbose option 2021-10-04 05:19:47 +02:00
Kim Woelders 1f7ef0225e Imlib.h: Add version macros 2021-09-26 17:38:09 +02:00
Kim Woelders ab52c354fe autofoo: Drop support for libungif
Obsolete for 15+ years.
2021-09-26 17:38:09 +02:00
Kim Woelders b200f57e92 JPEG loader: Parse EXIF data and handle orientation 2021-09-25 13:02:06 +02:00
Kim Woelders c5e0e786f9 JPEG loader: Cosmetics
Mostly trivial name changes to facilitate debugging.
2021-09-25 13:02:06 +02:00
Kim Woelders 46fca7c9a7 imlib2_load: Add option to use imlib_load_image_immediately() 2021-09-25 13:02:06 +02:00
Kim Woelders e99c7a3bf0 Test: Fix dist
Also do proper clean.
2021-09-25 11:06:02 +02:00
Kim Woelders 8ac8041adf Test: Add some minimal regression testing 2021-09-19 13:12:20 +02:00
Kim Woelders e9d84bd216 Drop imlib2-config (use pkg-config) 2021-09-19 13:12:20 +02:00
Kim Woelders 7808f34750 Build .xz instead of .bz2 release tarball
Somewhat smaller (~16%), faster decompression.
2021-09-19 13:11:59 +02:00
Kim Woelders 32c30cb58e 1.7.4 2021-09-17 13:11:27 +02:00
Kim Woelders 5512f0a2e3 image.c: Use the LOAD_... macros to check loader return values 2021-09-16 10:54:09 +02:00
Kim Woelders 42bcd0bff3 Update Changelog to new format 2021-09-16 10:53:29 +02:00
Kim Woelders fd2c2ef004 Add script to generate Changelog 2021-09-16 10:53:29 +02:00
Kim Woelders adda6d7b9c GIF, TIFF, WEBP loaders: Fix loading if filename does not have usual suffix - take 2
Better solution from from Daniel Friesel <derf@finalrewind.org> / Lars
Stoltenow.
2021-09-15 19:43:48 +02:00
Kim Woelders b71221ce76 Revert "GIF, TIFF, WEBP loaders: Fix loading if filename does not have usual suffix"
This reverts commit 43f82f3bc8.
2021-09-15 19:43:48 +02:00
Kim Woelders 43f82f3bc8 GIF, TIFF, WEBP loaders: Fix loading if filename does not have usual suffix
Patch from Daniel Friesel <derf@finalrewind.org>:

---
Fix .gif loader if filename does not end in .gif

Imlib2 is currently unable to load gif images if the filename does not end in
.gif. This appears to be caused by imlib2 not resetting the file descriptor
back to 0 after trying to open the image with its different loaders.

While imlib2 does call rewind(FILE* im->fp) before invoking each loader, this
does not guarantee that the underlying FD is seeked as well. However, the GIF
loader uses the FD directly, and therefore tries to read from the middle of the
file (unless it is the first loader). This patch adds an explicit seek in the
same fashion as implemented in the TIFF loader.

Patch and debugging credits go to Lars Stoltenow.
---

Also fix same issue in TIFF and WEBP loaders.
2021-09-14 07:43:55 +02:00
Kim Woelders b78a66195f LBM loader: Fix potential out-of-bounds memory access 2021-09-14 07:42:34 +02:00
Kim Woelders dbeb622c7a WEBP loader: Rename fd variable to be same as everywhere else 2021-09-14 07:42:34 +02:00
Kim Woelders c018a7687c WEBP loader: Remove forgotten debug printout 2021-09-14 07:42:34 +02:00
Kim Woelders 3a4d6d4590 imlib2_view: Fix issue with new default scaling
Need to distinguish between scaling option value and applied scaling
when viewing multiple images.
2021-08-21 12:01:43 +02:00
Kim Woelders ecc7a342ff imlib2_view: Add some debug 2021-08-21 10:05:57 +02:00
Kim Woelders a748550fa4 imlib2_view: By default scale large images to fit on screen 2021-08-21 10:05:57 +02:00
Kim Woelders 34afe297cd imlib2_view: Cleanups 2021-08-21 10:05:57 +02:00
Kim Woelders 0497d2bb0c imlib2_view: Move property stuff to separate file
May reuse it elsewhere.
2021-08-21 10:05:57 +02:00
Kim Woelders b9c88445a2 1.7.3 2021-08-08 19:28:09 +02:00
Kim Woelders d2ff569608 autofoo: Resurrect non-pkg check for bzip2
Apparently upstream (1.0.8) does not provide a .pc file but some
distributions add one.
2021-08-07 18:46:35 +02:00
Kim Woelders 8bd1a401bc 1.7.2 2021-07-27 18:55:18 +02:00
Kim Woelders 1a439ed4df WEBP saver: Use fopen() etc. like all other savers 2021-07-16 23:08:10 +02:00
Kim Woelders e709825314 Loaders: Remove unnecessary headers 2021-07-16 19:40:03 +02:00
Kim Woelders 3c21caea23 Correct (disabled) debug printouts 2021-07-13 09:07:27 +02:00
Kim Woelders 49af0f9d59 Add feature to build with ASAN (--enable-gcc-asan) 2021-07-13 08:55:33 +02:00
Kim Woelders 651c56bb29 Drop unused Imlib_Object_List:last 2021-07-13 08:20:11 +02:00
Kim Woelders c31a5b98a2 Cleanups: while->for loops (pixmaps list) 2021-07-10 15:44:17 +02:00