MantisBT - NetSurf
View Issue Details
0002580NetSurfGTK-specificpublic2017-12-06 15:392018-08-29 15:04
ReporterFelix S. 
Assigned To 
PlatformOSOS Version
Product Version3.7 
Target Version3.8Fixed in Version3.8 
Fixed in CI build #4289
Reported in CI build #
URL of problem page
Summary0002580: Botched pixel format conversion corrupts librsvg-rendered images
DescriptionSVG images rendered by NetSurf with the librsvg backend appear split into two parts, at one third of the image width. Both parts are wrongly coloured. The reason for this is a mistake in the image rendering code, specifically the routine which converts the rendered output into the pixel format used internally by NetSurf.
Steps To Reproduce0. Compile NetSurf with the librsvg backend enabled.
1. Open a random page with an SVG image embedded.
2. Observe the rendering.
Additional InformationAttached patch fixes the issue. The fixed code uses a uint8_t[4]/uint32_t union in order to avoid relying on target endianness (cairo's pixel format uses native 32-bit integers, NetSurf's uses a fixed order of 8-bit channels)
TagsNo tags attached.
Attached Filespatch netsurf-rsvg.patch (735) 2017-12-06 15:39

John-Mark Bell   
2018-01-20 15:34   
Thanks for the report. This is now fixed.
Vincent Sanders   
2018-08-29 15:04   
Thank you for your report, this has been resolved in the 3.8 release

Issue History
2017-12-06 15:39Felix S.New Issue
2017-12-06 15:39Felix S.File Added: netsurf-rsvg.patch
2018-01-20 15:34John-Mark BellNote Added: 0001706
2018-01-20 15:35John-Mark BellProduct Version => 3.7
2018-01-20 15:35John-Mark BellFixed in Version => 3.8
2018-01-20 15:35John-Mark BellTarget Version => 3.8
2018-01-20 15:35John-Mark BellSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=1993#r1993
2018-01-20 15:35John-Mark BellFixed in CI build # => 4289
2018-01-20 15:35John-Mark BellStatusnew => resolved
2018-01-20 15:35John-Mark BellResolutionopen => fixed
2018-08-29 15:04Vincent SandersStatusresolved => closed
2018-08-29 15:04Vincent SandersNote Added: 0001841