summaryrefslogtreecommitdiff
path: root/src/gd_tiff.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix deprecared function prototypesKhem Raj2022-08-231-3/+1
| | | | | | | Fixes following errors: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] Signed-off-by: Khem Raj <raj.khem@gmail.com>
* silent warning/unused args when codecs not enabledPierre Joye2021-08-161-0/+10
|
* replace uint32 with uint32_t and uint16 with uint16_6Khem Raj2021-04-231-26/+26
| | | | | | | uint16 and uint32 are now deprecated in libtiff and suggestion is to use standard C99 types Signed-off-by: Khem Raj <raj.khem@gmail.com>
* add missing gd_intern.h includeMike Frysinger2021-02-081-0/+1
| | | | | I removed the local MIN/MAX macros, but missed adding the gd_intern.h include when doing so.
* gd_intern: unify the min/max/clamp macros some moreMike Frysinger2021-02-051-4/+0
|
* add stub ABI funcs when formats are disabled #345Mike Frysinger2019-02-091-0/+41
| | | | | | We do this for some funcs already, so add jpeg/png/tiff/liq/webp stubs too. This keeps our ABI stable and lets code do runtime detection instead.
* Remove Git ident attributesPeter Kokot2018-06-271-1/+0
| | | | | | | | 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.
* clean up trailing whitespace/newlinesMike Frysinger2018-06-211-3/+3
| | | | | This is preparation for adding some linting checks for new commits from people. Shouldn't be any functional changes here (tests still pass!).
* Fix Coverity #155475: Failure to restore alphaBlendingFlagChristoph M. Becker2017-01-301-5/+5
| | | | | | Actually, there is no need to change the alphaBlendingFlag in the first place, if the buffer allocation fails, so we move the allocation attempt up.
* Fix and reenable optimized support for reading 1 bps TIFFsChristoph M. Becker2017-01-251-8/+21
| | | | | | | | | | | | | | | Due to #82 the optimized support for reading 1 bps TIFF files (black & white) had been disabled. Tony Lew already pointed out a fix in #88. Furthermore, there was the following missing and improper error handling: * TIFFReadScanline() returns -1 on error, not 0 * the result of TIFFReadTile() hasn't been checked * in case of failure of these functions, the error had not been propagated We fix this, and re-enable direct support for 1 bps TIFFs, which is more memory efficient than the general RGBA support. We also make sure not to hit any not yet implemented code path.
* Fix invalid read in gdImageCreateFromTiffPtr()Christoph M. Becker2016-12-131-13/+16
| | | | | | | | | | | | | | | | | tiff_invalid_read.tiff is corrupt, and causes an invalid read in gdImageCreateFromTiffPtr(), but not in gdImageCreateFromTiff(). The culprit is dynamicGetbuf(), which doesn't check for out-of-bound reads. In this case, dynamicGetbuf() is called with a negative dp->pos, but also positive buffer overflows have to be handled, in which case 0 has to be returned (cf. commit 75e29a9). Fixing dynamicGetbuf() exhibits that the corrupt TIFF would still create the image, because the return value of TIFFReadRGBAImage() is not checked. We do that, and let createFromTiffRgba() fail if TIFFReadRGBAImage() fails. This issue had been reported by Ibrahim El-Sayed to security@libgd.org. CVE-2016-6911
* Group the supported image formats in the menu of the docsChristoph M. Becker2016-08-141-0/+9
| | | | | To do so we have to add Menu.txt to the project, but we can ignore Languages.txt and Topics.txt, at least for now.
* Document all BGD_DECLARE'd functionsChristoph M. Becker2016-07-201-20/+26
| | | | | We add only minimal documentation comments for now, but at least that lets Natural Docs add the function prototypes to the documentation.
* fix coverity CID 149461, check return value, return errorPierre Joye2016-06-201-4/+6
|
* fix memory leakPierre Joye2016-06-191-0/+1
|
* tiff: fix leak in gdImageCreateFromTiffCtx()David Drysdale2016-05-011-0/+2
| | | | | The ephemeral tiff_handle used when interacting with libtiff needs to be freed.
* Added support for reading and writing TIFFTAG_XRESOLUTION andMatt Bosworth2016-01-221-1/+12
| | | | TIFFTAG_YRESOLUTION. Includes a unit test.
* fix #82, fix 1 bit tiff supportPierre Joye2015-01-201-1/+1
|
* fix #89, fix leaks on tiff readPierre Joye2015-01-191-0/+15
|
* Rewrite readTiffBw to use less variables (Thanks Niels Thykier for catching ↵Ondřej Surý2013-05-201-15/+4
| | | | that)
* WS & CSOndřej Surý2013-04-301-23/+22
|
* Fix: -Wmaybe-uninitialized (false positive, just to make gcc happy) + fix ↵Remi Collet2013-04-211-3/+6
| | | | possible memory leak
* avoid warning: implicit declaration of function ‘gd_error’ ↵Takeshi Abe2013-04-201-0/+1
| | | | [-Wimplicit-function-declaration]
* Use custom error handler instead of fprintf(stderr, ...)Ondřej Surý2013-04-181-15/+15
|
* Don't export tiffWriter function, it should be only used from gdImageTiffOndřej Surý2013-04-141-1/+1
|
* - apply same CS everywherepierrejoye2013-04-031-192/+190
|
* search GD headers locally at firstTakeshi Abe2013-03-011-2/+2
| | | | at least for gcc's cpp: http://gcc.gnu.org/onlinedocs/cpp/Search-Path.html
* fix -Wsign-compareTakeshi Abe2013-02-151-6/+5
|
* fix -Wunused-but-set-variabletabe2013-02-111-20/+4
|
* fix -Wunused-parametertabe2013-02-111-1/+14
|
* fixed possible segfaults when gdNewDynamicCtx() returns nulltabe2009-06-251-0/+2
|
* fix for FS#204tabe2009-06-181-0/+2
| | | | | * gdImageCreateFrom*() returns null if null pointer given * gdImage*() puts nothing if null pointer given
* check whether a new image is null or not.tabe2009-03-041-0/+2
|
* *** empty log message ***chapg2007-12-311-1/+1
|
* *** empty log message ***chapg2007-12-311-2/+2
|
* - kill compiler warningspajoye2007-12-281-15/+11
| | | | - nuke unused vars
* - #121, tiff support, fix possible issue with sequence ops (compilerspajoye2007-12-271-1/+5
| | | | may behave differently)
* - According to the standard, the '#' char must be at column 0 (Thanks Nuno)mattias2007-10-281-1/+1
|
* - mark all non-exported functions as static (Nuno Lopes)mattias2007-10-231-7/+7
|
* - Removed todomattias2007-10-231-2/+1
|
* Make the spelling of color consistent with the rest of libgd, though colour ↵scottmac2007-10-131-19/+19
| | | | is the correct way... :)
* - stop if the tiff ctx handler cannot be createdpajoye2007-10-071-5/+21
|
* - drop unused varpajoye2007-10-071-12/+8
| | | | - update (c)
* - #121, rewamp it almost completelypajoye2007-10-071-364/+510
| | | | | | | | | - add support for 1..8bit, 24 and 32bit pixels - replace black&white and gray support - add default rgba import for unknown/unsupported format - detect which mode is better to be used (save us double or triple alloc of a complete image buffer) - fix alpha support (extra alpha in extra planes are not supported)
* replace pow(2, ) with a bitwise shiftnlopess2007-10-061-5/+5
| | | | add comment to note that no overflow check is necessary in the colorMap* allocations
* mark all non-exported functions as staticnlopess2007-10-061-9/+9
|
* - missing ;pajoye2007-10-051-13/+16
| | | | | - add casting - fix logic in malloc test
* - ws + csmattias2007-10-041-20/+29
|
* - Added checking for allocationmattias2007-10-041-6/+24
|
* - Use gdMalloc and gdFreemattias2007-10-041-20/+20
|