Commit 035ed691 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira

Merge branch 'giflib' into 'master'

Include copy of GifQuantizeBuffer function from giflib

See merge request !45
parents 77d31bbc 5d9dd96d
Pipeline #46449 skipped
......@@ -25,6 +25,13 @@
extern "C" {
#include <gif_lib.h>
#if GIFLIB_MAJOR > 5 || GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 2 || GIFLIB_MAJOR == 5 && GIFLIB_MINOR == 1 && GIFLIB_RELEASE >= 9
//see https://sourceforge.net/p/giflib/bugs/132/
//and https://sourceforge.net/p/giflib/bugs/142/
#include <quantize.h>
#endif
}
// QuantizeBuffer function definition that was inlined (only) in giflib 4.2
......
The GIFLIB distribution is Copyright (c) 1997 Eric S. Raymond
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
This diff is collapsed.
/***************************************************************************
getarg.h - Support routines for the giflib utilities
SPDX-License-Identifier: MIT
**************************************************************************/
#ifndef QUANTIZE_H
#define QUANTIZE_H
#include <gif_lib.h>
/******************************************************************************
Color table quantization
******************************************************************************/
int GifQuantizeBuffer(unsigned int Width, unsigned int Height,
int *ColorMapSize, GifByteType * RedInput,
GifByteType * GreenInput, GifByteType * BlueInput,
GifByteType * OutputBuffer,
GifColorType * OutputColorMap);
#endif /*QUANTIZE_H */
/* end */
......@@ -10,6 +10,7 @@ from setuptools import setup, find_packages, dist
dist.Distribution(dict(setup_requires=['bob.extension', 'bob.blitz'] + bob_packages))
from bob.extension.utils import egrep, find_header, find_library
from bob.blitz.extension import Extension, Library, build_ext
from distutils.version import LooseVersion
from bob.extension.utils import load_requirements
build_requires = load_requirements()
......@@ -334,6 +335,8 @@ system_include_dirs = [
tiff_pkg.include_directory,
gif_pkg.include_directory,
]
if LooseVersion(gif_pkg.version) >= LooseVersion("5.1.9"):
system_include_dirs.append("bob/io/image/giflib")
library_dirs = [
jpeg_pkg.library_directory,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment