Closed alicebob closed 9 years ago
Thanks for the PR! What is the specific problem this fixes?
Sent from my iPhone
On Mar 15, 2014, at 20:06, Harmen notifications@github.com wrote:
Fix cairo_format_t to Go's image.RGBA conversion
You can merge this Pull Request by running
git pull https://github.com/alicebob/go-webkit2 master Or view, comment on, or merge it at:
https://github.com/sourcegraph/go-webkit2/pull/9
Commit Summary
Fix snapshot byte order File Changes
M webkit2/webview.go (32) Patch Links:
https://github.com/sourcegraph/go-webkit2/pull/9.patch https://github.com/sourcegraph/go-webkit2/pull/9.diff — Reply to this email directly or view it on GitHub.
The original did not convert the byte order going from cairo to Go (argb to rgba), but (depending on the endianness of the former) that showed as an image where the red and blue channels were swapped.
https://developer.gnome.org/cairo/stable/cairo-Image-Surfaces.html#cairo-format-t
CAIRO_FORMAT_ARGB32: each pixel is a 32-bit quantity, with alpha in the upper 8 bits, then red, then green, then blue. The 32-bit quantities are stored native-endian. ...
http://golang.org/pkg/image/#RGBA
... in R, G, B, A order ...
Can we get this merged in please?
Sorry for the delay. Merged!
Fix cairo_format_t to Go's image.RGBA conversion