Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2
epdfview
epdfview-0.1.8-fix-colors.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File epdfview-0.1.8-fix-colors.patch of Package epdfview
Index: trunk/src/PDFDocument.cxx =================================================================== --- trunk/src/PDFDocument.cxx (revision 361) +++ trunk/src/PDFDocument.cxx (revision 367) @@ -21,4 +21,5 @@ #include <poppler.h> #include <unistd.h> +#include <algorithm> #include "epdfview.h" @@ -33,4 +34,22 @@ static PageMode convertPageMode (gint pageMode); static gchar *getAbsoluteFileName (const gchar *fileName); + +namespace +{ + void + convert_bgra_to_rgba (guint8 *data, int width, int height) + { + using std::swap; + + for (int y = 0; y < height; y++) + { + for (int x = 0; x < width; x++) + { + swap(data[0], data[2]); + data += 4; + } + } + } +} /// @@ -651,4 +670,5 @@ cairo_destroy(context); cairo_surface_destroy (surface); + convert_bgra_to_rgba(renderedPage->getData (), width, height); #else // !HAVE_POPPLER_0_17_0 // Create the pixbuf from the data and render to it.
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor