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
Kim Woelders
0fdae6aa73
Rename files with line etc. drawing functions
...
Just grouping stuff with similar functionality.
2022-03-26 15:54:40 +01:00
Kim Woelders
ff24cd39fc
imlib2_load: Tweak verbose output
2022-03-26 15:54:40 +01:00
Kim Woelders
bc9867379c
Deprecate imlib_load/save_image_with_error_return()
2022-03-21 10:11:02 +01:00
Kim Woelders
4bf622173c
Switch to imlib_load/save_image_with_errno_return()
2022-03-21 10:09:18 +01:00
Kim Woelders
4229e1d1b6
Add imlib_load/save_image_with_errno_return() and imlib_strerror()
2022-03-20 07:29:12 +01:00
Kim Woelders
093e4bf8ad
Error code rework: Use errnos/new imlib2 error codes internally
...
Working on deprerecating the Imlib_Load_Error codes in favor of regular
errnos (positive) + imlib2 ones (IMLIB_ERR_..., negative).
2022-03-20 07:21:05 +01:00
Kim Woelders
54f3e9e54d
Tweak __imlib_LoadImageData()
2022-03-19 17:26:03 +01:00
Kim Woelders
bf07b104f3
Image load: Change error code on zero file size
...
From IMLIB_LOAD_ERROR_UNKNOWN to IMLIB_LOAD_ERROR_IMAGE_READ.
Mostly to get the same error from loading a 0 byte file as any other too
short file.
2022-03-19 17:25:54 +01:00
Kim Woelders
7d53ba4e86
Refactor some image saving functions
...
Change internal interface to resemble the loader one
2022-03-19 17:05:05 +01:00
Kim Woelders
7a84d3472f
Refactor some image loading functions
2022-03-19 17:05:05 +01:00
Kim Woelders
af1018bd65
api.c: Cosmetics
...
- Change 'filename' to 'file' for consistency
- Drop some unnecessary casts
2022-03-19 16:11:05 +01:00
Kim Woelders
7b671819f6
WEBP saver: Fix return code on success
2022-03-18 20:54:50 +01:00
Kim Woelders
303ae94179
Move API documentation to header file
2022-03-18 06:02:02 +01:00
Kim Woelders
e47e1a6cf4
Remove some deprecation comments
...
The fallback font functions have been commented as deprecated for ~15
years now.
I cannot remember what the problem may or may not have been, so let's
just drop the comments.
Also, move the call to free a fallback font in imlib_free_font() to the
internals (avoiding to call deprecated functions if the font fallback
chain stuff should be deprecated for real some day).
2022-03-17 15:14:00 +01:00
Kim Woelders
d93ab097bf
v1.8.1
2022-03-15 13:30:03 +01:00
Kim Woelders
4a6e74616e
test: Exclude from tarball
2022-03-15 13:28:28 +01:00
Kim Woelders
16cda0cc97
test: Properly include test.h in test SOURCES
2022-03-15 13:26:33 +01:00
Tobias Stoeckmann
5d9a589612
imlib2_load: fix typo
...
Fix typo in -n description.
2022-03-15 07:25:56 +01:00