Commit Graph

57 Commits

Author SHA1 Message Date
Michael Drake b32bc70de7
libnsgif: Update to latest upstream (#3142)
Allows clients to know if the scan encountered a truncated image.
2022-11-05 11:16:23 +00:00
Michael Drake 2189e49dc7
Update to latest upstream libnsgif and call nsgif_data_complete (#3141)
* libnsgif: update script: Fix to handle dir with no patches

* libnsgif: Update to latest upstream

Fixes loading of broken gifs with truncated final frame.

* nsgifload: Call nsgif_data_complete after data scan

This allows libnsgif to distinguish between awaiting more
data, and a broken truncated GIF. In the latter case we
can display what we have.
2022-11-05 04:14:45 +00:00
John Cupitt 538aa2a841
remove autotools (#2941)
* remove autotools

It seems to all work. I tested with gtk-doc enabled. I probably missed a
few things argh.

* oop, forgot m4/
2022-07-24 11:14:52 +01:00
Kleis Auke Wolthuizen ae831a145e
Cleanup .gitignore (#2889)
* Cleanup .gitignore

* Re-add `patches` directory to `Makefile.am`

And ensure it's being tracked by git.
2022-06-23 16:36:47 +01:00
John Cupitt d9f31be67d configure should add meson files to make dist
add meson.build etc. to EXTRA_DIST

see https://github.com/libvips/libvips/issues/2876
2022-06-20 15:04:33 +01:00
John Cupitt a129476f0f fix "make dist" ready for 8.13 rc1 2022-06-19 16:20:30 +01:00
John Cupitt 7561d4e52c add libnsgif COPYING
oops, we were missing the COPYING file

see https://github.com/libvips/libvips/issues/2800

thanks mika-fischer
2022-05-12 09:48:58 +01:00
Michael Drake ceaa2d2096
Update LibNSGIF to latest upstream (#2791)
* libnsgif: Update to latest upstream

* nsgifload: Add palette info to debug output.
2022-05-09 10:20:57 +01:00
Michael Drake 0c3092fa94
libnsgif: Update to latest upstream (#2766)
That's great! Thank you for doing this, Michael.
2022-04-15 18:23:56 +01:00
Michael Drake 0f30690360
Update to latest libnsgif (#2747)
* libnsgif: Update to latest upstream.

* nsgifload: Update for new pixel format API.

LibNSGIF now lets the client select a pixel colour component
order. We use NSGIF_BITMAP_FMT_R8G8B8A8, which is the same
format LibNSGIF always decoded to.

* nsgifload: Remove loop_count from VERBOSE output.

This was internal state for a nsgif_frame_prepare() managed
animation, but VIPS doesn't use nsgif_frame_prepare(). The
loop_count member has been removed from the public structure.
2022-04-04 13:57:20 +01:00
Michael Drake 292ee9a47e
libnsgif: Update to latest upstream. (#2712) 2022-03-09 10:13:48 +00:00
Michael Drake 5f7c12e474
libnsgif: Update to latest upstream. (#2706) 2022-03-04 08:05:36 +00:00
Michael Drake 8e9fe72dea
Update libnsgif (#2699)
* libnsgif: Rename upstream README with markdown extension.

* libnsgif: Drop default frame delay patch

* libnsgif: Remove unused utils / log.h header.

* libnsgif: Rename files to match upstream.

* libnsgif: Extend update script to update local README and test/

* libnsgif: Run update script.

* libnsgif: Update buildsystem for renamed files

* nsgifload: Switch to new library header.

* nsgifload: Remove optional and unused bitmap callbacks.

* nsgifload: Update to use new libnsgif API.
2022-03-03 10:02:36 +00:00
Michael Drake b05515b0c5
Update libnsgif from upstream (#2674)
* libnsgif: Remove patch artifact.

* libnsgif: Update from upstream.
2022-02-21 20:07:20 +00:00
Corentin Noël 02901436d4
Add meson build system (#2637)
Allows to use the Meson build system to build the project.
2022-02-08 15:19:36 +00:00
John Cupitt 03a073b68d set default GIF frame delay to 100ms
was 1000ms, see https://github.com/libvips/libvips/issues/2582
2021-12-18 18:20:18 +00:00
Michael Drake 8c9d899acd
libnsgif: Update to the latest upstream master (#2547)
* libnsgif: Delete patch for read only source data.

The source data is now read only in upstream libnsgif and the code
has changed quite a bit so this does not apply.

* libnsgif: Update to latest upstream master.

* libnsgif: Only one insufficient data return code now.

There is only one code now, for "I need more data".

* libnsgif: Update for renamed structure member.
2021-11-21 10:06:37 +00:00
John Cupitt 60bae63644 updale libnsgif from upstream
seems slightly slower overall
2021-10-07 10:48:12 +01:00
John Cupitt bd8f2de6fd fix libnsgif build
"make dist" was picking up .o files in libnsgif/
2021-04-30 14:28:29 +01:00
John Cupitt cc1020ae55 update libnsgif
for improved lzw decode
2021-04-24 18:57:20 +01:00
John Cupitt 83c4e56cfb fix a crash found by oss-fuzz 2021-04-22 23:02:34 +01:00
Kleis Auke Wolthuizen d9faf3fe01 Fix autogen warning 2021-04-22 12:02:29 +02:00
John Cupitt 4cd5da2303 update libnsgif from upstream 2021-04-18 18:58:09 +01:00
Michael Drake a373fd766e lzw: Always read three bytes on fast path to avoid swtich. 2021-04-18 17:50:42 +01:00
Michael Drake 98e8673dbc lzw: Restrict pointers through code reader. 2021-04-18 17:50:42 +01:00
Michael Drake 71eb67ba7c lzw: Constify table pointers in writer functions. 2021-04-18 17:50:42 +01:00
Michael Drake 020fc32108 gif: Switch complex decoder over to continuous lzw API. 2021-04-18 17:50:42 +01:00
Michael Drake 05fddf49e3 lzw: Direct output into frame data, avoiding stack.
If the frame is non-interlaced, and has the same rowstride as the
full image, then we can decode lzw directly into the output image.
2021-04-18 17:50:42 +01:00
Michael Drake 0d394487c1 gif: Handle any uncompressed output before exiting due to error. 2021-04-18 17:50:42 +01:00
Michael Drake 5426e9b81a lzw: Add function for decoding multiple LZW codes at a time. 2021-04-18 17:50:42 +01:00
Michael Drake ed3363b899 lzw: Add support for resumable output of a single code.
This allows handling of insufficient output buffer space.
2021-04-18 17:50:42 +01:00
Michael Drake abd8619bef lzw: Return output array from decode function instead of init. 2021-04-18 17:50:42 +01:00
Michael Drake 01fde32f99 gif: Frame decoding: Rearrange for readability. 2021-04-18 17:50:42 +01:00
Michael Drake 7426c3d500 gif: Frame decoding: Simplify transparency check. 2021-04-18 17:50:42 +01:00
Michael Drake 663bf07aac lzw: Remove written member from context.
Not needed now that clear codes are handled normally.
2021-04-18 17:50:42 +01:00
Michael Drake 64ddf20599 lzw: Adapt main code handling to handle clear codes too. 2021-04-18 17:50:42 +01:00
Michael Drake 367f64c5bc lzw: Output values in picture order. 2021-04-18 17:50:42 +01:00
Michael Drake 06443e64e9 lzw: Store code's value count in table. 2021-04-18 17:50:42 +01:00
Michael Drake 8d8aa0dd46 gif: Split out gif frame data decode. 2021-04-18 17:50:42 +01:00
Michael Drake c9a639d2bd lzw: Rename a bunch of structures, functions and variables.
new_code              -> code
    last_value            -> value
    first_value           -> first
    previous_entry        -> extends
    current_entry         -> table_size
    previous_code         -> prev_code
    previous_code_first   -> prev_code_first
    current_code_size     -> code_size
    current_code_size_max -> code_max
    lzw__next_code        -> lzw_read_code
2021-04-18 17:50:42 +01:00
Michael Drake 26c83999cc lzw: Split out output writing. 2021-04-18 17:50:42 +01:00
Michael Drake 92d53337d8 lzw: Rename minimum_code_size to match what it's called in spec. 2021-04-18 17:50:42 +01:00
Michael Drake ac2d57c288 lzw: Slight simplification of clear code handling. 2021-04-18 17:50:42 +01:00
Michael Drake eb07e204e7 lzw: Avoid code size increment check when dictionary is full. 2021-04-18 17:50:42 +01:00
Michael Drake 1714cf6c3a lzw: Split out dictionary augmentation. 2021-04-18 17:50:42 +01:00
Michael Drake 47a441f86b lzw: Create #define for number of dictionary entry slots. 2021-04-18 17:50:42 +01:00
Michael Drake f66e20e017 lzw: Simplify new code handling.
The tiny overhead of an extra time through the output loop
is worth the simpler code.
2021-04-18 17:50:42 +01:00
John Cupitt f726edb7f7 remove stray bitmap_create call
missed this one in the delay gif alloc patch
2021-04-03 12:28:41 +01:00
John Cupitt 07e73475c1 make a patch for the libnsgif alloc delay 2021-04-02 12:00:50 +01:00
John Cupitt 9bdf5e8cda try delaying libnsgif alloc until read frame
gives the caller a chance to detect memory bombs
2021-04-01 12:53:57 +01:00