Bug 132297 - Header PNG image appears in low resolution with SKIA
Summary: Header PNG image appears in low resolution with SKIA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Not Assigned
Whiteboard: target:7.0.0
Depends on:
Blocks: Skia
  Show dependency treegraph
Reported: 2020-04-21 10:58 UTC by NISZ LibreOffice Team
Modified: 2020-05-11 08:40 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

The example file with SKIA rendering (118.05 KB, image/png)
2020-04-21 10:58 UTC, NISZ LibreOffice Team
The example file with OpenGL rendering (156.15 KB, image/png)
2020-04-21 10:58 UTC, NISZ LibreOffice Team
rendering comparisons (141.66 KB, image/png)
2020-04-21 15:46 UTC, V Stuart Foote

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2020-04-21 10:58:02 UTC
Created attachment 159779 [details]
The example file with SKIA rendering

Attachment #149464 [details] from bug #123617 contains a PNG image in the header. With SKIA backend this appears in very low resolution, while with OpenGL it appears in high resolution.

Steps to reproduce:
    1. Open Attachment #149464 [details]

Actual results:
Low resolution image

Expected results:
High resolution image

LibreOffice details:
Version: (x64)Build ID: 8c8b3a4f83f67882b284ddc3b3fe10d3fe6dedf4CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win; Locale: hu-HU (hu_HU); UI-Language: en-USCalc: CL
Comment 1 NISZ LibreOffice Team 2020-04-21 10:58:24 UTC
Created attachment 159780 [details]
The example file with OpenGL rendering
Comment 2 V Stuart Foote 2020-04-21 15:46:51 UTC
Created attachment 159796 [details]
rendering comparisons

Confirming the visible artifacts in down sampling the PNG artwork when inserted into page header--comparing OpenGL to Skia / Raster or Vulkan rendering

When inserted to header, the image looks to be scaled at about 35% to fit.

But, as shown in the attached screen clip--Skia rendering (Vulkan or Raster) does no better nor worse with rendering image details under similar scaling ~50% when brought in document at page margins.

So, either specifics of image resampling done to populate the header, or breakdown in resampling at greater reduction for the Skia rendering.  I didn't hunt for it in the source--but I'd suspect it is unique to the header/footer image handling.
Comment 3 Commit Notification 2020-04-24 08:47:02 UTC
Luboš Luňák committed a patch related to this issue.
It has been pushed to "master":


high quality scaling in skia drawTransformedBitmap (tdf#132297)

It will be available in 7.0.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:

Affected users are encouraged to test the fix and report feedback.
Comment 4 V Stuart Foote 2020-04-25 13:52:43 UTC
Confirmed with TB77 build for 2020-04-25, scaling on insert to header is crisp
Version: (x64)
Build ID: fe1cf8656d6963844553993a77ef565fb2fbeda7
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Vulkan; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded
Comment 5 BogdanB 2020-05-11 08:40:49 UTC
it's ok on
Build ID: 6a03b2a54143a9bc0c6d4c7f1...
CPU threads: 4; OS: Linux 5.4; UI render: Skia/Raster; VCL: x11; 
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded