pngwtran.c


Log

Author Commit Date CI Message
Cosmin Truta 85acd919 2018-12-01T09:36:00 [master] Imported from libpng-1.6.36.tar
Cosmin Truta ceb32778 2018-08-18T22:47:16 Remove top-level const from function-scope variables As per the const correctness rules, top-level const-ness of data in automatic scopes does not propagate outside of these scopes (unlike const-ness at lower levels, such as pointers to const data). Previously, const was used liberally, but inconsistently across the libpng codebase. Using const wherever applicable is not incorrect. However, _consistent_ use of const is difficult to maintain in such conditions. In conclusion, we shall continue to use const only where doing so is strictly necessary: 1. If a function guarantees that it will not modify an argument passed by pointer, the corresponding function parameter should be a pointer-to-const (const T *). 2. Static data should not be modified, therefore it should be const. Reference: Google C++ Style Guide https://google.github.io/styleguide/cppguide.html#Use_of_const
Cosmin Truta a8738932 2018-07-28T18:47:21 Remove the "last changed" version information from source comments This information is maintained by the version control system.
Cosmin Truta 8da39742 2018-07-15T23:58:00 [master] Imported from libpng-1.6.35.tar
Cosmin Truta 46aedd89 2018-07-15T23:58:00 Release libpng version 1.6.35
Cosmin Truta a74aa9a0 2018-06-17T22:37:44 [libpng16] Replace the remaining uses of png_size_t with size_t In v1.6.0, size_t became a required type. It should be used consistently. To maintain backwards compatibility, png_size_t is still maintained in deprecated form.
Glenn Randers-Pehrson 35cbe764 2016-10-19T19:07:25 [master] Imported from libpng-1.6.26.tar
Glenn Randers-Pehrson 0c440812 2016-10-19T19:07:25 [libpng16] Imported from libpng-1.6.26.tar
Glenn Randers-Pehrson 761d8333 2016-10-02T18:46:35 [libpng16] Quieted all remaining -Wconversion compiler warnings
Glenn Randers-Pehrson 0c29ab2b 2016-08-03T21:16:26 [master] Imported from libpng-1.6.24.tar
Glenn Randers-Pehrson b50d5cea 2016-08-03T21:16:26 [libpng16] Imported from libpng-1.6.24.tar
Glenn Randers-Pehrson dd70604c 2016-07-15T11:20:46 [libpng16] Fixed more indentation
Glenn Randers-Pehrson 5756fcab 2016-01-15T09:52:13 [master] Imported from libpng-1.6.21.tar
Glenn Randers-Pehrson 4d8de339 2015-12-13T22:41:17 [libpng16] Update copyright uears in source files.
Glenn Randers-Pehrson 287fb892 2015-07-22T22:36:43 [master] Imported from libpng-1.6.18.tar
Glenn Randers-Pehrson e6172809 2015-07-22T22:36:43 [libpng16] Imported from libpng-1.6.18.tar
John Bowler b780eba4 2015-06-03T14:46:34 [libpng16] Fixed cexcept.h in which GCC 5 now reports that one of the auto variables in the Try macro needs to be volatile to prevent value being lost over the setjmp.
Glenn Randers-Pehrson c861dc89 2015-04-01T12:06:01 [libpng16] Suppressed some warnings from the Borland C++ 5.5.1/5.82 compiler (Bug report by Viktor Szaka'ts).
Glenn Randers-Pehrson 2b667e49 2015-03-26T08:06:25 [master] Imported from libpng-1.6.17.tar
Glenn Randers-Pehrson c98f7fb4 2015-03-26T08:06:25 [libpng16] Imported from libpng-1.6.17.tar
Glenn Randers-Pehrson c5370ede 2015-03-21T11:54:32 [libpng16] Reverted "& 0xff" additions of version 1.6.17beta01. Libpng passes the Coverity scan without them.
Glenn Randers-Pehrson 4029db9a 2015-02-27T18:50:07 [libpng16] Imported from libpng-1.6.17beta06.tar
Glenn Randers-Pehrson 7011a8ce 2015-02-27T18:53:44 [libpng16] Added "& 0xff" to things being typecast to "png_byte".
Glenn Randers-Pehrson da7a1e79 2014-11-20T09:33:25 [master] Imported from libpng-1.6.15.tar
Glenn Randers-Pehrson e8ef689c 2014-11-20T09:33:25 [libpng16] Imported from libpng-1.6.15.tar
Glenn Randers-Pehrson cda68df8 2014-11-06T22:11:39 [libpng16] Changed "#endif /* PNG_FEATURE_SUPPORTED */" to "#endif /* FEATURE */"
Glenn Randers-Pehrson 70cb8f9a 2014-11-06T20:58:33 [libpng16] Removed #ifdef PNG_16BIT_SUPPORTED/#endif around png_product2(); it is needed by png_reciprocal2(). Added #ifdef PNG_16BIT_SUPPORTED/#endif around png_log16bit() and png_do_swap().
Glenn Randers-Pehrson f2d4167f 2014-10-31T21:17:11 [libpng16] Added a pair of parentheses suggested by clang
Glenn Randers-Pehrson 5d713fe1 2014-10-31T20:48:55 [libpng16] Changed remaining "if (!x)" to "if (x == 0)" and "if (x)" to "if (x !== 0)"
Glenn Randers-Pehrson a710317d 2014-02-05T22:28:57 [master] Imported from libpng-1.6.9.tar
Glenn Randers-Pehrson 3e753eb8 2014-02-05T22:28:57 [libpng16] Imported from libpng-1.6.9.tar
Glenn Randers-Pehrson 95a19739 2013-12-31T21:10:13 [libpng16] Updated copyright year in recently-changed files.
Glenn Randers-Pehrson 38f49403 2013-12-22T15:00:59 [libpng16] Update "last changed" dates in recently-patched files.
John Bowler 8f1150eb 2013-12-19T15:33:49 [libpng16] Made transform implementation functions static. This makes the internal functions called by png_do_{read|write}_transformations static. On an x86-64 DLL build (Gentoo Linux) this reduces the size of the text segment of the DLL by 1208 bytes, about 0.6%. It also simplifies maintenance by removing the declarations from pngpriv.h and allowing easier changes to the internal interfaces.
John Bowler c10930a4 2013-12-19T15:24:06 [libpng16] Bookkeeping: Moved functions around (no changes). Moved transform function definitions before the place where they are called so that they can be masde static. Move the intrapixel functions and the grayscale palette builder out of the png?tran.c files. The latter isn't a transform function and is no longer used internally, and the former MNG specific functions are better placed in pngread/pngwrite.c
Glenn Randers-Pehrson 871b1d0f 2013-03-02T14:58:22 [libpng16] Bump version to 1.6.1beta05
Glenn Randers-Pehrson f3af706c 2012-02-02T23:11:45 [libpng16] Imported from libpng-1.6.0beta05.tar
Glenn Randers-Pehrson 0da9cf38 2013-02-13T22:49:19 [master] Imported from libpng-1.6.0.tar
Glenn Randers-Pehrson c53778ff 2013-02-13T22:49:09 [libpng16] Imported from libpng-1.6.0.tar
Glenn Randers-Pehrson 9477ecdf 2013-01-01T07:45:42 [libpng16] Updated copyright year to 2013 in newly-changed files
Glenn Randers-Pehrson c2ac10b5 2012-09-27T06:21:28 [master] Imported from libpng-1.5.13.tar
John Bowler 8fb6c6a9 2012-01-25T07:47:44 [libpng16] Eliminated Intel icc/icl compiler warnings. The Intel (GCC derived) compiler issues slightly different warnings from those issued by the current vesions of GCC. This eliminates those warnings by adding/removing casts and small code rewrites.
Glenn Randers-Pehrson 1531bd61 2012-01-01T14:45:04 [libpng16] Updated copyright year to 2012
John Bowler 5d56786e 2011-12-24T09:12:00 [libpng16] Implemented 'restrict' for png_info and png_struct. Added new "png_structrp" typedef. Because of the way libpng works both png_info and png_struct are always accessed via a single pointer. This means adding C99 'restrict' to the pointer gives the compiler some opportunity to optimize the code. This change allows that.
Glenn Randers-Pehrson 55e85c24 2011-11-04T13:34:48 [libpng15] Imported from libpng-1.5.7beta01.tar
Glenn Randers-Pehrson 2b7d730e 2011-11-02T23:06:45 [libpng15] Bump version to libpng-1.5.7beta01
Glenn Randers-Pehrson bc6726bc 2011-11-02T22:43:00 [libpng15] Imported from libpng-1.5.6.tar
Glenn Randers-Pehrson bb5cb147 2011-09-22T12:41:58 [libpng15] Bump version to libpng-1.5.6beta02
Glenn Randers-Pehrson d404b6d4 2011-07-07T06:24:57 [devel] Imported from libpng-1.5.4.tar
John Bowler 550bab03 2011-06-14T06:17:26 [devel] Removed the ACCURATE and LEGACY options (they are no longer useable) Fixed some compiliation problems with scaling options.
John Bowler 4a12f4a2 2011-04-17T18:34:22 [devel] Cleanup of conditional compilation code and of background/gamma handling. Internal changes only except for a new option to avoid compiling in the png_build_grayscale_palette API (which is not used at all internally.) The main change is to move the transform tests (READ_TRANSFORMS, WRITE_TRANSFORMS) up one level to the caller of the APIs.
Glenn Randers-Pehrson cb1aee25 2011-04-16T19:27:34 [devel] Fixed bug with stripping the filler or alpha channel when writing, that was introduced in libpng-1.5.2beta01.
Glenn Randers-Pehrson dcc3505c 2011-03-31T11:23:49 [devel] Imported from libpng-1.5.2.tar
Glenn Randers-Pehrson cad6798a 2011-02-13T06:10:34 [devel] Imported from libpng-1.5.2beta01.tar
John Bowler 9b872f4c 2011-02-12T09:00:16 [devel] Clean up ALPHA flags and transformations
Glenn Randers-Pehrson f5ea1b70 2011-01-06T06:42:51 [devel] Imported from libpng-1.5.0.tar
Glenn Randers-Pehrson 64b863cd 2011-01-04T09:57:06 [devel] Update copyright year and bump to version libpng-1.5.0rc07
Glenn Randers-Pehrson b3edc73a 2010-11-21T14:06:41 [devel] Changes to remove gcc warnings (John Bowler) Certain optional gcc warning flags resulted in warnings in libpng code. With these changes only -Wconversion and -Wcast-qual cannot be turned on. Changes are trivial rearrangements of code. -Wconversion is not possible for pngrutil.c (because of the widespread use of += et al on variables smaller than (int) or (unsigned int)) and -Wcast-qual is not possible with pngwio.c and pngwutil.c because the 'write' callback and zlib compression both fail to declare their input buffers with 'const'.
Glenn Randers-Pehrson 2922c07e 2010-11-21T14:02:16 [master] Changes to remove gcc warnings (John Bowler)
Glenn Randers-Pehrson ccadcae4 2010-10-23T17:29:13 [devel] Added whitespace in pngrutil.c, pngwtran.c, and pngwutil.c
Glenn Randers-Pehrson f0eda4e8 2010-10-15T15:01:57 [devel] Imported from libpng-1.5.0beta51.tar
Glenn Randers-Pehrson 7e1fabe2 2010-10-14T07:29:03 [devel] Imported from libpng-1.5.0beta50.tar
Glenn Randers-Pehrson 1b49a71d 2010-10-07T20:59:06 [devel] Imported from libpng-1.5.0beta49.tar
Glenn Randers-Pehrson 83b4fc4a 2010-10-04T23:03:24 [devel] Imported from libpng-1.5.0beta48.tar
Glenn Randers-Pehrson b0876110 2010-10-04T17:24:36 [devel] Fixed problem with symbols creation in Makefile.am which was assuming that CCP writes to standard output by default (Martin Banky).
Glenn Randers-Pehrson bcb3aac3 2010-09-10T22:05:27 [devel] Fixed a number of problems with 64-bit compilation reported by Visual Studio 2010 (John Bowler).
Glenn Randers-Pehrson 39515c9e 2010-08-28T06:21:35 [devel] Imported from libpng-1.5.0beta46.tar
Glenn Randers-Pehrson 7d3e6732 2010-08-26T17:14:07 [devel] Added PNG_WRITE_16BIT_SUPPORTED option.
Glenn Randers-Pehrson a7119547 2010-08-26T07:07:37 [devel] Imported from libpng-1.5.0beta45.tar
Glenn Randers-Pehrson 9b362b1e 2010-08-24T09:03:56 [devel] Bump to version libpng-1.5.0beta45
Glenn Randers-Pehrson e600c513 2010-08-18T07:25:46 [devel]Made all API functions that have const arguments and constant string literal pointers declare them (John Bowler). Many APIs did not change their arguments but were not declared using PNG_CONST. This change corrects this. In a few cases APIs that return constant string literal pointers have also been changed to declare this. Unlike the argument change this may require app changes; however the results could never be written to (the app would crash on some platforms where strings are not writable), so this seems advisable.
Glenn Randers-Pehrson 363f96e7 2010-08-11T09:00:26 [devel] Imported from libpng-1.5.0beta41.tar
Glenn Randers-Pehrson 836fe66e 2010-08-06T06:52:34 [devel] Imported from libpng-1.5.0beta40.tar
Glenn Randers-Pehrson 2c700f97 2010-08-02T07:42:08 [devel] Imported from libpng-1.5.0beta39.tar
Glenn Randers-Pehrson bdabd8f7 2010-07-31T07:16:11 [devel] Bump to version libpng-1.5.0beta38
Glenn Randers-Pehrson 6c47e84d 2010-07-29T19:00:42 [devel] Bump to version libpng-1.5.0beta36
Glenn Randers-Pehrson 31aee0d0 2010-07-29T17:39:14 [devel] Fixed point APIs are now supported throughout (no missing APIs). Internal fixed point arithmetic support exists for all internal floating point operations. sCAL validates the floating point strings it is passed. Safe, albeit rudimentary, Watcom support is provided by PNG_API_RULE==2 Two new APIs exist to get the number of passes without turning on the PNG_INTERLACE transform and to get the number of rows in the current pass. A new test program, pngvalid.c, validates the gamma code. Errors in the 16 bit gamma correction (overflows) have been corrected. cHRM chunk testing is done consistently (previously the floating point API bypassed it, because the test really didn't work on FP, now the test is performed on the actual values to be stored in the PNG file so it works in the FP case too.) Most floating point APIs now simply call the fixed point APIs after converting the values to the fixed point form used in the PNG file. The standard headers no longer include zlib.h, which is currently only required for pngstruct.h and can therefore be internal. (Patches by John Bowler)
Glenn Randers-Pehrson 915bab5f 2010-07-24T08:22:59 [devel] Bump to version libpng-1.5.0beta35
Glenn Randers-Pehrson 39a8bb71 2010-07-12T06:43:50 [devel] Imported from libpng-1.5.0beta34.tar
Glenn Randers-Pehrson 8f9de7ac 2010-07-06T07:44:59 [devel] Bump back to version libpng-1.5.0beta34
Glenn Randers-Pehrson 289500ab 2010-06-28T20:14:31 [devel] Imported from libpng-1.5.0beta33.tar
Glenn Randers-Pehrson 4db34423 2010-06-25T20:13:41 [devel] Imported from libpng-1.5.0beta32.tar
Glenn Randers-Pehrson 821b7106 2010-06-24T16:16:32 [devel] Imported from libpng-1.5.0beta31.tar
Glenn Randers-Pehrson ef3831a1 2010-06-22T13:03:32 [devel] Imported from libpng-1.5.0beta30.tar
Glenn Randers-Pehrson 5feb87cd 2010-06-21T12:28:05 [devel] Imported from libpng-1.5.0beta29.tar
Glenn Randers-Pehrson 57d96179 2010-06-19T19:25:17 [devel] Imported from libpng-1.5.0beta28.tar
Glenn Randers-Pehrson 5b3d554e 2010-06-18T21:55:53 [devel] Imported from libpng-1.5.0beta26.tar
Glenn Randers-Pehrson 53c07f59 2010-06-18T18:55:55 [devel] Imported from libpng-1.5.0beta25.tar
Glenn Randers-Pehrson 537c1a57 2010-05-07T09:42:14 [devel] Imported from libpng-1.5.0beta24.tar
Glenn Randers-Pehrson f24daf23 2010-05-06T09:44:04 [devel] Added more blank lines for readability.
Glenn Randers-Pehrson aa3143cf 2010-04-29T10:53:48 [devel] Imported from libpng-1.5.0beta23.tar
Glenn Randers-Pehrson bb317fb0 2010-04-28T07:44:23 [devel] Bump to libpng-1.5.0beta22
Glenn Randers-Pehrson deec549d 2010-04-26T22:44:40 [devel] Imported from libpng-1.5.0beta21.tar
Glenn Randers-Pehrson 9c5beb56 2010-04-24T20:25:19 [devel] Bump back to version libpng-1.5.0beta21
Glenn Randers-Pehrson b56e0d06 2010-04-24T12:10:36 [devel] Imported from libpng-1.5.0beta19.tar
Glenn Randers-Pehrson 5623f781 2010-04-17T19:08:05 [devel] Imported from libpng-1.5.0beta18.tar
Glenn Randers-Pehrson 3cd7cffd 2010-04-16T19:27:08 [devel] Imported from libpng-1.5.0beta17.tar
Glenn Randers-Pehrson a019c335 2010-04-16T10:23:01 [master] Bump to version 1.4.2rc03
Glenn Randers-Pehrson d6e67586 2010-04-16T07:21:51 [master] Imported from libpng-1.4.2rc02.tar
Glenn Randers-Pehrson 0f544f62 2010-04-10T06:40:53 [master] Imported from libpng-1.4.2rc01.tar