Changeset 367
- Timestamp:
- 07/05/11 05:23:38 (11 months ago)
- File:
-
- 1 edited
-
trunk/src/PDFDocument.cxx (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/PDFDocument.cxx
r361 r367 21 21 #include <poppler.h> 22 22 #include <unistd.h> 23 #include <algorithm> 23 24 #include "epdfview.h" 24 25 … … 33 34 static PageMode convertPageMode (gint pageMode); 34 35 static gchar *getAbsoluteFileName (const gchar *fileName); 36 37 namespace 38 { 39 void 40 convert_bgra_to_rgba (guint8 *data, int width, int height) 41 { 42 using std::swap; 43 44 for (int y = 0; y < height; y++) 45 { 46 for (int x = 0; x < width; x++) 47 { 48 swap(data[0], data[2]); 49 data += 4; 50 } 51 } 52 } 53 } 35 54 36 55 /// … … 651 670 cairo_destroy(context); 652 671 cairo_surface_destroy (surface); 672 convert_bgra_to_rgba(renderedPage->getData (), width, height); 653 673 #else // !HAVE_POPPLER_0_17_0 654 674 // Create the pixbuf from the data and render to it.
Note: See TracChangeset
for help on using the changeset viewer.
