diff --git a/src/add-ons/translators/pngtranslator/PNGTranslator.cpp b/src/add-ons/translators/pngtranslator/PNGTranslator.cpp index 73319b58a5..30a0b485b6 100644 --- a/src/add-ons/translators/pngtranslator/PNGTranslator.cpp +++ b/src/add-ons/translators/pngtranslator/PNGTranslator.cpp @@ -294,6 +294,9 @@ status_t PNGTranslator::translate_from_png_to_bits(BPositionIO *inSource, BPositionIO *outDestination) { + if (identify_png_header(inSource, NULL) != B_OK) + return B_NO_TRANSLATOR; + status_t result = B_ERROR; // if a libpng errors before this is set // to a different value, the above is what @@ -489,7 +492,6 @@ PNGTranslator::translate_from_png(BPositionIO *inSource, uint32 outType, else { // Translate from PNG to PNG translate_direct_copy(inSource, outDestination); - return B_OK; } } diff --git a/src/add-ons/translators/pngtranslator/PNGView.cpp b/src/add-ons/translators/pngtranslator/PNGView.cpp index bc385c7548..1cd13e61d9 100644 --- a/src/add-ons/translators/pngtranslator/PNGView.cpp +++ b/src/add-ons/translators/pngtranslator/PNGView.cpp @@ -153,8 +153,8 @@ PNGView::Draw(BRect area) char detail[100]; sprintf(detail, "Version %d.%d.%d %s", static_cast(B_TRANSLATION_MAJOR_VER(PNG_TRANSLATOR_VERSION)), - static_cast(B_TRANSLATION_MAJOR_VER(PNG_TRANSLATOR_VERSION)), - static_cast(B_TRANSLATION_MAJOR_VER(PNG_TRANSLATOR_VERSION)), + static_cast(B_TRANSLATION_MINOR_VER(PNG_TRANSLATOR_VERSION)), + static_cast(B_TRANSLATION_REVSN_VER(PNG_TRANSLATOR_VERSION)), __DATE__); DrawString(detail, BPoint(xbold, yplain + ybold));