summaryrefslogtreecommitdiff
path: root/gdk/loaders/gdkjpeg.c
Commit message (Collapse)AuthorAgeFilesLines
* jpeg: Use GdkTexureDownloader when savingBenjamin Otte2023-02-151-8/+10
|
* gdk: Fix possible memory errorsMatthias Clasen2022-11-181-2/+3
| | | | | | | clang complained that we may end up jumping to the cleanup code without initializing data in the jpeg code. Always initialize data to NULL to prevent that eventuality.
* gdk: Bump the jpeg malloc limitMatthias Clasen2022-10-311-1/+2
| | | | | Bump the limit for memory use during jpeg loading to 1GB, matching what gdk-pixbuf has for this.
* Drop gdkintl.hMatthias Clasen2022-09-231-1/+1
| | | | | This header was merely including gi18n-lib.h. Just do that directly.
* Bump the jpeg memory limitMatthias Clasen2022-08-221-2/+2
| | | | | | | Commit 59f6c50df8d4d9 set the memory limit to 100M, which turns out to exclude some large, valid jpegs. So, bump things to 300M, matching what was done in gdk-pixbuf.
* jpeg loader: Limit memory consumptionMatthias Clasen2022-08-101-0/+5
| | | | | | This will prevent stupid oom situations with pathological jpeg files, without affecting our ability to load reasonable images.
* gdkjpeg: include `stdlib.h` necessary for `free`Mosè Giordano2022-02-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | `free` is defined in `stdlib.h`, see for example <https://pubs.opengroup.org/onlinepubs/009604499/functions/free.html>. Without this include compilation can fail with the following error: ``` ../gdk/loaders/gdkjpeg.c: In function ‘gdk_save_jpeg’: ../gdk/loaders/gdkjpeg.c:264:7: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration] free (data); ^ ../gdk/loaders/gdkjpeg.c:264:7: warning: incompatible implicit declaration of built-in function ‘free’ ../gdk/loaders/gdkjpeg.c:264:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’ ../gdk/loaders/gdkjpeg.c:302:67: error: ‘free’ undeclared (first use in this function) return g_bytes_new_with_free_func (data, size, (GDestroyNotify) free, NULL); ^ ../gdk/loaders/gdkjpeg.c:302:67: note: each undeclared identifier is reported only once for each function it appears in ../gdk/loaders/gdkjpeg.c:303:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ ```
* jpeg: Use gdk_memory_texture_from_texture()Benjamin Otte2021-10-181-39/+12
|
* gdk loaders: Add noreturn attribtues where appropriateTimm Bäder2021-10-021-1/+1
|
* loaders: Add profiler marksMatthias Clasen2021-09-181-0/+5
| | | | | These are potentially expensive calls, we should make sure they show up in profiles.
* texture: Rework error enumBenjamin Otte2021-09-171-9/+9
| | | | | | | | | | | 1. Change INSUFFICIENT_MEMORY to TOO_LARGE GTK crashes on insufficient memory, we don't emit GErrors. 2. Split UNSUPPORTED into UNSUPPORTED_CONTENT and UNSUPPORTED_FORMAT So we know if you need to find an RPM with a loader or curse and the weird file. 3. Translate error messages, they are meant for end users.
* Add code to save jpegsMatthias Clasen2021-09-171-11/+194
|
* Add code to load jpegsMatthias Clasen2021-09-171-0/+146
This lets us avoid gdk-pixbuf for loading textures from the common image formats. As a consequence, we are now linking against libjpeg.