mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Improve and modernize png2pnm.c: * Remove the explicit reading of the input PNG file signature. Libpng is now able to read it, check it, and issue an appropriate error message in case of magic number mismatch or file corruption. (See the function `png_read_sig`.) * Remove the explicit allocation and dealocation of the image data. Libpng is now able to manage all the image data automatically. (See the function `png_read_png`.) * Specify the needed image transformations without a-priori checking the image type for applicability. * Use the `png_set_expand_gray_1_2_4_to_8` transformation. Since libpng version 1.2.9, this transformation (if needed) must be enabled separately from `png_set_expand`. Improve and modernize pnm2png.c: * Modify the allocation of image data, in order to match libpng's internal allocation model. * Transfer the ownership of the image data from the `pnm2png` function to libpng, which will manage and dealocate it at the right time. (See the functions `png_set_image_rows` and `png_data_freer`.) Refactor, clean up, etc.
15 lines
773 B
Plaintext
15 lines
773 B
Plaintext
|
|
pnm2png / png2pnm --- conversion from PBM/PGM/PPM-file to PNG-file
|
|
copyright (C) 1999-2019 by Willem van Schaik <willem at schaik dot com>
|
|
|
|
version 1.0 - 1999.10.15 - First version.
|
|
1.1 - 2015.07.29 - Fix memory leaks (Glenn Randers-Pehrson)
|
|
1.2 - 2017.04.22 - Add buffer-size check
|
|
1.3 - 2017.08.24 - Fix potential overflow in buffer-size check
|
|
(Glenn Randers-Pehrson)
|
|
1.4 - 2017.08.28 - Add PNGMINUS_UNUSED (Christian Hesse)
|
|
1.5 - 2018.08.05 - Fix buffer overflow in tokenizer (Cosmin Truta)
|
|
1.6 - 2018.08.05 - Improve portability and fix style (Cosmin Truta)
|
|
1.7 - 2019.01.22 - Change license to MIT (Willem van Schaik)
|
|
1.8 - 2024.01.08 - Fix, improve, modernize (Cosmin Truta)
|