From 0d1571916116e16ce6a64ab231f7f8632fcbd0e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toma=C5=BE=20Vajngerl?= Date: Tue, 8 Nov 2016 19:18:52 +0100 Subject: [PATCH] tdf#103801 JPEG - don't handle buffer orientation in import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We don't need to read buffer in reverse scanline order if image is bottom-up. This is handled by CopyScanline already. Change-Id: Ibb20978c01115743de8a457e56003d28ef6dd6d9 Reviewed-on: https://gerrit.libreoffice.org/30710 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- vcl/source/filter/jpeg/jpegc.cxx | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx index 28af8c915d4b..8fc0ed83b8bf 100644 --- a/vcl/source/filter/jpeg/jpegc.cxx +++ b/vcl/source/filter/jpeg/jpegc.cxx @@ -177,16 +177,6 @@ void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines, pCYMKBuffer.resize(nWidth * 4); } - const ScanlineFormat nFormat = pAccess->GetScanlineFormat(); - - bool bTopDown = true; - - if (( bGray && nFormat == ScanlineFormat::N8BitPal) || - (!bGray && nFormat == ScanlineFormat::N24BitTcRgb)) - { - bTopDown = pAccess->IsTopDown(); - } - std::unique_ptr pCols; if (bGray) @@ -228,9 +218,6 @@ void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines, jpeg_read_scanlines(&cinfo, reinterpret_cast(&p), 1); } - if (!bTopDown) - yIndex = nHeight - 1 - yIndex; - if (bGray) { for (long x = 0; x < nWidth; ++x)