diff --git a/src/add-ons/translators/pngtranslator/PNGTranslator.cpp b/src/add-ons/translators/pngtranslator/PNGTranslator.cpp index 30a0b485b6..32834db993 100644 --- a/src/add-ons/translators/pngtranslator/PNGTranslator.cpp +++ b/src/add-ons/translators/pngtranslator/PNGTranslator.cpp @@ -278,18 +278,6 @@ PNGTranslator::DerivedIdentify(BPositionIO *inSource, return identify_png_header(inSource, outInfo); } -void -translate_direct_copy(BPositionIO *inSource, BPositionIO *outDestination) -{ - const size_t kbufsize = 2048; - uint8 buffer[kbufsize]; - ssize_t ret = inSource->Read(buffer, kbufsize); - while (ret > 0) { - outDestination->Write(buffer, ret); - ret = inSource->Read(buffer, kbufsize); - } -} - status_t PNGTranslator::translate_from_png_to_bits(BPositionIO *inSource, BPositionIO *outDestination) diff --git a/src/add-ons/translators/shared/BaseTranslator.cpp b/src/add-ons/translators/shared/BaseTranslator.cpp index 476a0807dd..74cb10c7b2 100644 --- a/src/add-ons/translators/shared/BaseTranslator.cpp +++ b/src/add-ons/translators/shared/BaseTranslator.cpp @@ -685,3 +685,14 @@ BaseTranslator::NewConfigView(TranslatorSettings *settings) return NULL; } +void +translate_direct_copy(BPositionIO *inSource, BPositionIO *outDestination) +{ + const size_t kbufsize = 2048; + uint8 buffer[kbufsize]; + ssize_t ret = inSource->Read(buffer, kbufsize); + while (ret > 0) { + outDestination->Write(buffer, ret); + ret = inSource->Read(buffer, kbufsize); + } +} diff --git a/src/add-ons/translators/shared/BaseTranslator.h b/src/add-ons/translators/shared/BaseTranslator.h index 447229ecd7..7897757b9c 100644 --- a/src/add-ons/translators/shared/BaseTranslator.h +++ b/src/add-ons/translators/shared/BaseTranslator.h @@ -150,5 +150,7 @@ private: uint32 fTranType; }; +void translate_direct_copy(BPositionIO *inSource, BPositionIO *outDestination); + #endif // #ifndef BASE_TRANSLATOR_H