Commit Graph

1805 Commits

Author SHA1 Message Date
Kim Woelders 52511a15cc modules: Fix signdness warning 2022-06-30 08:17:44 +02:00
NRK 581de800b4 modules: check for filepath truncation
also check for (unlikely) snprintf error.
2022-06-29 18:42:26 +02:00
Kim Woelders 90824fc2fd test: Add test_misc 2022-06-24 21:33:23 +02:00
Kim Woelders c035f8d19a modules: Enable setting multiple loader/filter paths
IMLIB2_LOADER_PATH and IMLIB2_FILTER_PATH may now contain multiple colon
separated paths.
2022-06-23 07:40:18 +02:00
Kim Woelders d0372038fd modules: Cosmetics, mostly 2022-06-23 07:36:33 +02:00
Kim Woelders 416f847dc3 Introduce strsplit() 2022-06-23 07:36:23 +02:00
Kim Woelders 7ec44e68cb modules: Eliminate __imlib_TrimLoaderList()
Instead, don't put in the list what we would take out later.
2022-06-22 21:03:11 +02:00
Kim Woelders 33ab86c10f JPEG loader: Use mmap'ed file access
Doesn't seem to affect speed much.
2022-05-10 16:08:44 +02:00
Kim Woelders 3b241cff10 x11_color: Simplify and fix error paths
Freeing color on failure in __imlib_AllocColors1() was missing.

Success is 0 but using it as such here is confusing since return value 0
means failure.
2022-05-10 14:58:31 +02:00
NRK 1b8cf498e5 check for alloc failures some more 2022-05-09 15:15:10 +02:00
NRK 675b69414a check for some alloc failures 2022-05-09 14:28:14 +02:00
Kim Woelders 693d6c63ca v1.9.0 2022-04-21 10:11:38 +02:00
Kim Woelders 65cb3e33e3 SVG loader: Fix size when unit is percent some more
Non-debug case too..
2022-04-21 10:11:32 +02:00
Kim Woelders 2d31bab355 SVG loader: Fix size when unit is percent
Also consistently use lrint() instead of ceil() on FP values.
2022-04-18 20:14:09 +02:00
Kim Woelders e35b4dca6c SVG loader: Avoid some warnings in rsvg.h 2022-04-18 20:09:36 +02:00
Kim Woelders 31f0935707 JXL loader: Multiframe support
Does not work very well.
Looks like the time needed to render the N'th frame (from scratch) is
proportional to N, so reasonable performance would require the frames
to be generated sequentially while decoding the image.
2022-04-13 19:53:03 +02:00
Kim Woelders d98622ba67 debug: Export __imlib_time_us()
Forgotten.
2022-04-13 19:52:50 +02:00
Kim Woelders 59eae5643e Add PS/EPS loader using libspectre 2022-04-11 08:25:48 +02:00
Kim Woelders ee862ac6bf test: Add some of JPEG 2000 tests 2022-04-10 12:48:25 +02:00
Kim Woelders 9ebd8399d2 Add J2K (JPEG 2000) loader using openjpeg2 library 2022-04-10 12:45:23 +02:00
Kim Woelders e8b564f141 build: Tweaks
- Let test depend on src
- Run tests sequentially
2022-04-09 17:19:19 +02:00
Kim Woelders 11806ddb74 SVG loader: Faster signature check
Faster (when failing) than letting librsvg2 do it.
2022-04-09 17:17:58 +02:00
Kim Woelders b9496a326d loaders: Fix typo, fix order 2022-04-08 13:49:33 +02:00
Kim Woelders cd29542864 doc: Assorted documentation intro updates 2022-04-07 19:46:05 +02:00
Kim Woelders 190c79fa86 doc: New documentation build setup (doxygen) 2022-04-07 19:46:05 +02:00
Kim Woelders cbd3bc197a doc: Drop most old doc stuff 2022-04-07 19:16:58 +02:00
Kim Woelders 712d2b86a0 API doc updates 2022-04-07 17:40:25 +02:00
Kim Woelders c40c222b9c Revert a couple of unintended changes 2022-04-07 12:37:36 +02:00
Kim Woelders 1582453d76 API doc corrections and tweaks for doxygen 2022-04-07 11:33:05 +02:00
Kim Woelders 6c5620511c Drop deprecation noise from using imlib_load/save_image_with_error_return() 2022-04-07 11:30:38 +02:00
Kim Woelders a92585c569 Drop deprecation noise from using the old DATA types 2022-04-07 11:30:38 +02:00
Kim Woelders c85d63d710 image: Fix undesired change of format
In a previous commit im->format was always set before calling a loader
in order to make it available e.g. from loader progress callbacks via
imlib_image_format().

However, setting the format with imlib_image_set_format() on a
non-immediately loaded image would be overridden when the image data
was subsequently loaded.

Also move the initial setting of im->format up front so it's also set
for legacy load()s.
2022-04-07 11:30:38 +02:00
Kim Woelders d56be3b8df loaders: Ensure that found loader is ok for load/save
Fixes a segv that could happen if trying to save an image with a not
previously loaded loader that has no saver.
Bug since v1.7.5.
2022-04-07 11:30:38 +02:00
Kim Woelders c13f4ddf65 test_save: Updates
Catch various issues related to
- loader caching
- loader lookup for saving
- deferred loading in connection with saving
2022-04-07 11:29:22 +02:00
Kim Woelders 766c9d096f test: Add basic jxl test 2022-04-02 20:18:56 +02:00
Kim Woelders 323a95cd4e Add jxl loader 2022-04-02 20:18:56 +02:00
Kim Woelders 63dccd46c5 TIFF loader: Use mmap'ed file access
Doesn't seem to affect speed much.
2022-04-02 02:20:30 +02:00
Kim Woelders 2255a119d8 SVG loader: Requires librsvg-2.46 2022-04-02 02:20:30 +02:00
Kim Woelders 8ee9c0bade debug: Enable using hex values in IMLIB2_DEBUG 2022-04-02 02:20:30 +02:00
Kim Woelders 3aeceb6a7b Loaders: Remove unnecessary calls to __imlib_FreeData()
__imlib_LoadImageWrapper() does it when required so no need for
doing it in every loader.
2022-03-31 21:49:56 +02:00
Kim Woelders 51f683c0c6 Loaders: Some trivial cosmetics 2022-03-31 20:47:36 +02:00
Kim Woelders ad5fac52e7 imlib2_view: Verbose and debug message tweaks 2022-03-29 13:20:33 +02:00
Kim Woelders 7bad340aca image.c: Loading tweaks
- Set im->format before calling the loader
  This means that imlib_image_format() now also works when called from
  progress callback.
  It causes a small overhead when loading fails but that path is slow
  anyway.
- Drop obsolete im->w/h check on failure
2022-03-29 13:03:08 +02:00
Kim Woelders 771ff09c29 GIF loader: Use mmap'ed file access
Seems to be ~4% faster.
2022-03-29 06:54:55 +02:00
Kim Woelders 90fac1f53d GZ loader: Fix uncompressor exit code 2022-03-29 06:54:55 +02:00
Kim Woelders 6dc9530ff8 image.c: Cosmetics (move function) 2022-03-29 06:54:55 +02:00
Kim Woelders beedd6a5a3 image.c: Correct loader probe loop
If the "best loader" failed we might unnecessarily try some loaders when
dealing with corrupt images.
2022-03-29 06:54:55 +02:00
Kim Woelders 4892864735 imlib2_load: Show load time per load too 2022-03-29 06:54:55 +02:00
Kim Woelders ac0d69863b test_load: Check deferred loading too 2022-03-29 06:54:55 +02:00
Kim Woelders 18d0befc57 Use stdint types instead of DATA32 etc.
This should make things slightly more consistent and unambiguous, and
the stdint types are already used here and there (in loaders).

I'm not aware of any systems where this change makes any difference.
If there are targets out there with 64 bit ints imlib2 might now work
there and on targets with 16 bit ints it most likely still doesn't.
2022-03-26 15:54:40 +01:00