Kaydet (Commit) 0d157191 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Tomaž Vajngerl

tdf#103801 JPEG - don't handle buffer orientation in import

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/30710Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
üst c40e6060
......@@ -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<BitmapColor[]> pCols;
if (bGray)
......@@ -228,9 +218,6 @@ void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines,
jpeg_read_scanlines(&cinfo, reinterpret_cast<JSAMPARRAY>(&p), 1);
}
if (!bTopDown)
yIndex = nHeight - 1 - yIndex;
if (bGray)
{
for (long x = 0; x < nWidth; ++x)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment