Commit Graph

57 Commits (master)

Author SHA1 Message Date
Pierre Joye 167ea1f4f0
Fix tests based on coverity reports (#819)
* Partial #818, unused arg

* Partial #818, init var

* partail #818, fix va_args usage

* partail #818, handle f* calls and avoid possible call to malloc with negative values

* partail #818, prevent double free

* partail #818, resource leak if test fail

* partail #818, null deref fix

* partail #818, avoid double free on fp failure

* Partial #818, fix error msg

* Partial #818, leak on error

* Partial #818, null deref

* Partial #818, avoid possible negative index on failure

* partial #818, does not free if we return if requested new size overflow

* partial #818, avoid double free, free where the alloc happened
2022-02-01 15:09:01 +07:00
Tim Gates f7e57be725 docs: Fix a few typos
There are small typos in:
- examples/copyrotated.c
- src/gd.c
- src/gd.h
- src/gd_avif.c
- src/gd_nnquant.c
- src/gd_tga.c
- src/gd_topal.c
- src/wbmp.c
- tests/avif/compare_avif_to_png.c

Fixes:
- Should read `requires` rather than `reqiures`.
- Should read `of the` rather than `ofthe`.
- Should read `memory` rather than `memmory`.
- Should read `maximum` rather than `maxmum`.
- Should read `intersection` rather than `intertersection`.
- Should read `hypotenuse` rather than `hypothenus`.
- Should read `flexibility` rather than `flexibilty`.
- Should read `always` rather than `alwasy`.
- Should read `also` rather than `alos`.
2021-09-23 01:13:40 -04:00
Pierre Joye 668f6b5fcf Add image scale example 2021-08-16 13:47:59 +07:00
Pierre Joye cd17df9087 add HEIC example 2021-08-14 04:09:39 +07:00
Ben Morss f2aa2836ed
AVIF support (#671)
Demand for AVIF support on the web is growing, as the word gets out
about this new file format which allows higher-quality encoding at
smaller sizes.  Core contributors to major open-source CMSs are
interested in auto-generating AVIF images! They've been simply
waiting for support to appear in libgd.

This PR aims to meet the growing demand, and to help bring smaller,
more beautiful images to more of the web - to sites created by
experienced developers and CMS users alike.

This PR adds support by incorporating libavif in addition to the
existing libheif support.  It's generally felt that libavif has
more complete support for the AVIF format. libavif is also used
by the Chromium project and squoosh.app.

In this PR, I've endeavored to incorporate the latest research into
best practices for AVIF encoding - not just for default quantizer
values, but also an algorithm for determining the number of
horizontal tiles, vertical tiles, and threads.

Fixes #557.
2021-03-03 21:35:56 -05:00
Peter Kokot 01c59d840b Remove Git ident attributes
Git ident attributes were in most cases utilized with SVN and keywords
substitutions, where $Id$ were replaced with certain revision from the
repository. In Git this functionality is different. Each $Id$ needs to
be defined in .gitattributes file to be effective. This patch removes
unused and outdated attributes.
2018-06-27 02:04:37 +02:00
Mike Frysinger 1e3a3d9819 examples: fix build errors in previous cleanup here
There was a double paste error in the name "nnquant", and the link
line needs to come after we add programs.  This was missed locally
due to the conditional logic (blah).
2018-06-26 04:07:10 -04:00
Mike Frysinger 08b0dbaec6 move (redundant) ifdef checks from source to build files
We've been tracking program deps in the build files, so it ends up
being redundant for a lot of our test/example programs.  Clean them
up, and update some of the cmake/automake files as needed.
2018-06-21 23:55:11 -04:00
Mike Frysinger fd06f7f83c clean up trailing whitespace/newlines
This is preparation for adding some linting checks for new commits from
people.  Shouldn't be any functional changes here (tests still pass!).
2018-06-21 22:47:42 -04:00
Haegul Pyun 6653f3b535 Fix #440: new_width & new_height exception handling
Since the cos range is a real number range, there is a possibility of negative numbers.
- handling fabs new_width & new_height
2018-04-18 15:03:48 +02:00
Leo Yang 7147b646f4 Make BUILD_SHARED_LIBS configurable
As previously build both shared and static if BUILD_SHARED_LIBS is ON.
Otherwise build static only.
2015-08-27 13:11:37 -04:00
Remi Collet 1de3b80052 new example "resize" 2014-03-12 17:02:39 +01:00
Ondřej Surý 0d7f125fd4 Make distcheck work (fixes #54) 2013-05-04 22:23:38 +02:00
Pierre Joye e5b9482db4 avoid non init'ed im if no png support 2013-04-04 16:56:13 +02:00
Pierre Joye 1aa7ad8d26 fix examples build 2013-04-04 16:45:13 +02:00
pierrejoye e20413bf6b - apply same CS everywhere 2013-04-03 14:23:11 +02:00
Takeshi Abe c893b03eae simplify code with LIST(APPEND ...) 2013-03-08 16:56:32 +09:00
Takeshi Abe 0bf611185e drop duplicate entry in TEST_FILES 2013-02-21 17:08:07 +09:00
tabe 3efe2b55b1 fix -Wuninitialized 2013-02-11 12:15:12 +09:00
tabe 7c51c9b063 fix -Wreturn-type 2013-02-11 12:12:41 +09:00
tabe 535eab566b fix -Wunused-but-set-variable 2013-02-11 12:06:21 +09:00
tabe c18dfcd3cd fix -Wunused-variable 2013-02-11 11:41:52 +09:00
tabe 3aaf1ab557 fix -Wunused-parameter 2013-02-11 11:31:40 +09:00
tabe 8287bb35ce remove missing entries; sort lines 2013-02-10 19:54:58 +09:00
tabe 1c6a7fc965 add dependency on libm for copyrotated (refs gd-libgd #8) 2013-02-09 09:54:03 +09:00
tabe e428d819b7 drop obsolete .cvsignore 2013-02-07 14:33:54 +09:00
pajoye 1125ed1dc9 - add Makefile.am (dist) 2008-05-10 20:24:43 +00:00
pajoye a2ef6357a2 - encoding mess 2008-04-20 17:28:18 +00:00
pajoye 2e36ea55a3 - fix window example build 2008-04-20 17:27:56 +00:00
pajoye de77a4fb0f - fix windows GDI example build with mingw 2008-04-17 20:41:41 +00:00
pajoye 501248d3cc - add "win32" flag for the windows GUI example 2008-04-17 17:03:45 +00:00
pajoye dea4bed17b - #136, update the threshold crop to use color distance in the rgb cube
(3d distance) and normalize the threshold level from 0..1.0
2008-03-14 21:45:12 +00:00
pajoye 038b1a6a6a - resize example not yet commited 2008-03-14 21:40:33 +00:00
pajoye 67c1ccbd4d - add arc example 2008-03-14 21:39:13 +00:00
pajoye e253210769 - don't double convert to radian 2008-02-28 09:49:52 +00:00
pajoye 51f2fe8934 - add copyRotated example 2008-02-28 00:03:59 +00:00
pajoye 41d830e0c1 - #129:
- revert horizontal/vertical, was too confusing, it acts now like any
   application (ie. gimp/ps) instead of talking about h/v axis
 - optimize both
 - add simple example
2008-02-27 23:25:00 +00:00
pajoye b98ec972ae - wrong comment, copy/paste evilness 2008-01-28 14:11:43 +00:00
pajoye f769fe0a0d - add animated GIF example with a palette per frame (local palette) 2008-01-22 17:46:02 +00:00
pajoye 50ba0f31c8 - enable the bezier curve and animation of the bezier control points selection 2008-01-20 16:05:56 +00:00
pajoye b7a002a9f6 - fix crash when the window is resized
- cleanup  (smaller and proper code)
2008-01-20 15:56:21 +00:00
pajoye 0075f3bce3 - add windows example (draw in a window) 2008-01-15 23:23:06 +00:00
pajoye ef28739763 - drop comment 2008-01-15 11:29:14 +00:00
pajoye dd3f202e71 - don't try to build when jpeg support is not available 2008-01-15 11:28:43 +00:00
pajoye 1cde5eda0d - add nnquant to the build 2008-01-15 11:10:00 +00:00
pajoye 9f7be6505b *** empty log message *** 2008-01-13 21:11:35 +00:00
pajoye 1d5ab9b5a3 - cleanup
- nuke unused var
2008-01-05 20:46:08 +00:00
pajoye 2c8a4e8343 - remove useless include 2008-01-01 17:26:37 +00:00
pajoye 346dea25e1 - #58, Add new dithering alogirthm based on nthony Dekker's neuquant
algorithm using http://pngnq.sourceforge.net/ with alpha support
2007-12-31 00:58:38 +00:00
pajoye 176627adf3 - nuke unused variables 2007-12-28 16:54:24 +00:00