History log of /haiku/src/add-ons/translators/png/PNGTranslator.cpp
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 2ca13760 20-Aug-2021 Coldfirex <sakison@gmail.com>

Mass updating of OpenBeOS text to Haiku

No functional code altered.

https://dev.haiku-os.org/ticket/17197

Change-Id: I75cc74f6be0ad968fd77c31fbe5b0f650a6fe9e0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4364
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# fc86ef2c 09-May-2020 Adrien Destugues <pulkomandy@pulkomandy.tk>

Revert "Add-ons: Add alert warning to PNGTranslator"

This reverts commit 450208975b6a059e645e8c2b4a77c346b9b03b71.

The alert is not appropriate because applications cannot intercept it.

Fixes #15734

Change-Id: I5be98367ae615a572193406a559e5d34617e445c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2626
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 45020897 09-Jan-2020 Zotyamester <szatmary.zoltan1222@gmail.com>

Add-ons: Add alert warning to PNGTranslator

Change-Id: I148fb44055f6e0fc6f68307df04a4ad4ebb660fa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2097
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 6c8b0b37 10-Nov-2018 Murai Takashi <tmurai01@gmail.com>

PNGTranslator: Fix PVS 2237-2241

* Use new(std::nothrow) so that NULL check for allocated memory makes sense.
* Other new() without NULL check is replaced with new(std::nothrow).

Change-Id: I23df98e58ea1960463e86a75ff69d67855f59074
Reviewed-on: https://review.haiku-os.org/690
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 54de05d9 22-Jul-2017 Adrien Destugues <pulkomandy@pulkomandy.tk>

Fix error handling in PNG trnalsator

The default error handling code in libpng uses setjmp/longjmp. This is
annoying, because stack variables may be corrupt, unless they are
declared volatile.

Instead of declaring everytihng volatile, we can tell libpng to use
custom error functions, which will throw a C++ exception, making the
code more readable and less crashy.

Also handle the png_read_end function returning errors without failing
the whole decoding. This happens for example in the old diskusage
documentation screenshots, where this function fails after the image was
completely and correctly decoded. Ignoring the error lets ShowImage show
these pictures.

Fixes the crash reported in #6775.

# 1b29ad28 10-Jul-2016 Adrien Destugues <pulkomandy@pulkomandy.tk>

PNG translator: fix gcc2 complaining about setjmp clobbering variables.

Fixes #12662.

# 546208a5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.

# aec33db1 27-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

Replace inappropriate usage of strncpy by strlcpy

# 3927bd3c 26-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

Prevent string overflow by replacing usage of strcpy by strncpy

CID 8951, CID 10733, CID 10734, CID 10735, CID 10736, CID 10737, CID 10738,
CID 10739

# 8dca2efd 21-Jan-2011 Jérôme Duval <korli@users.berlios.de>

Applied patchs from Karvjorm (tickets #7125, #7131, #7126, #7129): Localizations for PNG PCX HVIF and HPGS translators.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40262 a95241bf-73f2-0310-859d-f6bbb57e9c96

# bf243977 18-Jan-2011 Philippe Houdoin <philippe.houdoin@gmail.com>

Made local variables actually local.
Both JPEGTranslator and JPEG200Translator were "exporting" gSettings symbol,
which when loaded within a app (like Paladin) exporting the same global symbol
was leading to a symbol resolution error. See #7114 for details.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40245 a95241bf-73f2-0310-859d-f6bbb57e9c96

# d8c9110c 19-Nov-2010 Jérôme Duval <korli@users.berlios.de>

updated libpng to 1.4.4
avoids warnings for gcc2 (deprecated attribute)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39523 a95241bf-73f2-0310-859d-f6bbb57e9c96

# 5291bbb0 13-Mar-2010 Jérôme Duval <korli@users.berlios.de>

libpng API changed, adapted PNGTranslator accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35847 a95241bf-73f2-0310-859d-f6bbb57e9c96

# fcc3e627 13-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Humdiner:
Changed strings in add-ons to sentence case. This is case-add-ons.diff
from #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35046 a95241bf-73f2-0310-859d-f6bbb57e9c96

# 9949213a 19-Oct-2005 Stephan Aßmus <superstippi@gmx.de>

removed the redundant "translator" from the folder names, fixed some warnings in the JPEG2000Translator

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14449 a95241bf-73f2-0310-859d-f6bbb57e9c96

# 54de05d9 22-Jul-2017 Adrien Destugues <pulkomandy@pulkomandy.tk>

Fix error handling in PNG trnalsator

The default error handling code in libpng uses setjmp/longjmp. This is
annoying, because stack variables may be corrupt, unless they are
declared volatile.

Instead of declaring everytihng volatile, we can tell libpng to use
custom error functions, which will throw a C++ exception, making the
code more readable and less crashy.

Also handle the png_read_end function returning errors without failing
the whole decoding. This happens for example in the old diskusage
documentation screenshots, where this function fails after the image was
completely and correctly decoded. Ignoring the error lets ShowImage show
these pictures.

Fixes the crash reported in #6775.


# 1b29ad28 10-Jul-2016 Adrien Destugues <pulkomandy@pulkomandy.tk>

PNG translator: fix gcc2 complaining about setjmp clobbering variables.

Fixes #12662.


# 546208a5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# aec33db1 27-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

Replace inappropriate usage of strncpy by strlcpy


# 3927bd3c 26-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

Prevent string overflow by replacing usage of strcpy by strncpy

CID 8951, CID 10733, CID 10734, CID 10735, CID 10736, CID 10737, CID 10738,
CID 10739


# 8dca2efd 21-Jan-2011 Jérôme Duval <korli@users.berlios.de>

Applied patchs from Karvjorm (tickets #7125, #7131, #7126, #7129): Localizations for PNG PCX HVIF and HPGS translators.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40262 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bf243977 18-Jan-2011 Philippe Houdoin <philippe.houdoin@gmail.com>

Made local variables actually local.
Both JPEGTranslator and JPEG200Translator were "exporting" gSettings symbol,
which when loaded within a app (like Paladin) exporting the same global symbol
was leading to a symbol resolution error. See #7114 for details.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40245 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d8c9110c 19-Nov-2010 Jérôme Duval <korli@users.berlios.de>

updated libpng to 1.4.4
avoids warnings for gcc2 (deprecated attribute)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39523 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5291bbb0 13-Mar-2010 Jérôme Duval <korli@users.berlios.de>

libpng API changed, adapted PNGTranslator accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35847 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fcc3e627 13-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Humdiner:
Changed strings in add-ons to sentence case. This is case-add-ons.diff
from #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35046 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9949213a 19-Oct-2005 Stephan Aßmus <superstippi@gmx.de>

removed the redundant "translator" from the folder names, fixed some warnings in the JPEG2000Translator

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14449 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 546208a53940a26c6379c48a7854ade1a8250fc5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# aec33db178d1475aedf4ee37f385d4c85ed721a3 27-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

Replace inappropriate usage of strncpy by strlcpy


# 3927bd3c0d16367eef862660f7b7a5309b66a5a1 26-Nov-2011 Philippe Saint-Pierre <stpere@gmail.com>

Prevent string overflow by replacing usage of strcpy by strncpy

CID 8951, CID 10733, CID 10734, CID 10735, CID 10736, CID 10737, CID 10738,
CID 10739


# 8dca2efd6296ed54786215e31123d77bce2d177a 21-Jan-2011 Jérôme Duval <korli@users.berlios.de>

Applied patchs from Karvjorm (tickets #7125, #7131, #7126, #7129): Localizations for PNG PCX HVIF and HPGS translators.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40262 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bf243977ffd34197ad7c0820c2da5d21abea0402 18-Jan-2011 Philippe Houdoin <philippe.houdoin@gmail.com>

Made local variables actually local.
Both JPEGTranslator and JPEG200Translator were "exporting" gSettings symbol,
which when loaded within a app (like Paladin) exporting the same global symbol
was leading to a symbol resolution error. See #7114 for details.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40245 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d8c9110cb62a569f6181740a56a8b14c4ed4e879 19-Nov-2010 Jérôme Duval <korli@users.berlios.de>

updated libpng to 1.4.4
avoids warnings for gcc2 (deprecated attribute)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39523 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5291bbb0bed55a62603573a91f2fe6d44447bc37 13-Mar-2010 Jérôme Duval <korli@users.berlios.de>

libpng API changed, adapted PNGTranslator accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35847 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fcc3e627e1aedc4075deb952c66068d542fe9abe 13-Jan-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Humdiner:
Changed strings in add-ons to sentence case. This is case-add-ons.diff
from #5169.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35046 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9949213a25979d177b420bc71891c2bff02a331d 19-Oct-2005 Stephan Aßmus <superstippi@gmx.de>

removed the redundant "translator" from the folder names, fixed some warnings in the JPEG2000Translator

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14449 a95241bf-73f2-0310-859d-f6bbb57e9c96