this treats quality == 100 as lossless similar to some other savers.
in case of lossless encoding, compression is derived from "quality" if
compression_tag was not set. in case of lossy encoding, the default is
used when compression_tag isn't set.
additionally, this fixes a bug in the older saver where fwrite might
have been called with a null fdata (which is UB) in case of an error.
Also:
- gif loader: Add error about corrupt frame sequence
- tiff loader: Drop OOM message - Not done elsewhere
- webp loader: Drop messages about quality tag outside [0-100] -
Not done elsewhere
It appears that in certain environments (homebrew on MacOS) the linker
does not like the -z nodelete option, so handle this differently.
old/legacy-imlib2#8
- configure.ac: Alphabetic order
- Makefile.am: Alphabetic order, no need for nodelete
- loaders.c: Add to known loaders
- loader_y4m.c: Remove some unneeded headers
Implemented just `_load()` for now.
Summary:
Implements a loader for y4m images. Uses liby4m and libyuv.
Only implements the `_load()` function as of now
Tested:
```
$ ./configure
...
Configuration Options Summary:
Image loaders:
Regular image loaders
GIF.....................: yes
HEIF....................: yes
Y4M.....................: yes
...
$ make -j
...
$ sudo make install
...
$ feh image.y4m
-- image shows up
```
Tested with yuv420p, yuv422p, and yuv444p images.
- Fix clipping to source.
- Fix error when mask from shape is requested but drawable is pixmap.
- Use queried drawable depth, not the context one.
This eliminates the last usage of the context depth in the grabbing
functions.
When using imlib_create[_scaled]_image_from_drawable() with non-zero
source offsets the output image could contain pixels either not set or
copied from uninitialised parts of intermediary pixmap.
Source clipping in imlib_copy_drawable_to_image() was broken and is
already dealt with in __imlib_GrabDrawableToRGBA().
Destination clipping has now been added.
On 1:1 scaling call __imlib_GrabDrawableToRGBA() directly instead of
going through __imlib_GrabDrawableScaledToRGBA().
This fixes 1:1 grabbing of pixmaps.
Non-1:1 pixmaps grabs are still not ok (window grabs are).
__imlib_FileCanRead() suffers from TOCTTOU issues. The file behind the
path it takes as a parameter can change while the function executes, and
also between the function's return and the caller's use of the path.
The function is also unused, so just delete it.