# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/libgif/hotfix-quantize.patch # Copyright (C) 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- --- ./gif_lib.h +++ ./gif_lib.h @@ -295,6 +295,14 @@ extern void GifDrawBoxedText8x8(SavedIma const char *legend, const int border, const int bg, const int fg); +/****************************************************************************** + Color table quantization +******************************************************************************/ +int GifQuantizeBuffer(unsigned int Width, unsigned int Height, + int *ColorMapSize, GifByteType * RedInput, + GifByteType * GreenInput, GifByteType * BlueInput, + GifByteType * OutputBuffer, + GifColorType * OutputColorMap); #ifdef __cplusplus } #endif /* __cplusplus */ --- ./Makefile.vanilla 2024-01-03 00:47:13.646380327 +0100 +++ ./Makefile 2024-01-03 00:47:23.522380332 +0100 @@ -29,11 +29,11 @@ LIBVER=$(LIBMAJOR).$(LIBMINOR).$(LIBPOINT) SOURCES = dgif_lib.c egif_lib.c gifalloc.c gif_err.c gif_font.c \ - gif_hash.c openbsd-reallocarray.c + gif_hash.c openbsd-reallocarray.c quantize.c HEADERS = gif_hash.h gif_lib.h gif_lib_private.h OBJECTS = $(SOURCES:.c=.o) -USOURCES = qprintf.c quantize.c getarg.c +USOURCES = qprintf.c getarg.c UHEADERS = getarg.h UOBJECTS = $(USOURCES:.c=.o)