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/30710 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This commit is contained in:
parent
c40e6060b2
commit
0d15719161
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user