You can't use ARGB directly with PDF, as the alpha channel is handled in a
different way. Use a simple RGB surface or separate out the A.
Leonard
From: Joerg Walter <joerg-wal...@gmx.de<mailto:joerg-wal...@gmx.de>>
Date: Wednesday, September 11, 2013 5:40 AM
To:
"podofo-users@lists.sourceforge.net<mailto:podofo-users@lists.sourceforge.net>"
<podofo-users@lists.sourceforge.net<mailto:podofo-users@lists.sourceforge.net>>
Subject: [Podofo-users] How to funnel cairo surface data into a PdfImage
I tried this, but all a get is a moree-pattern which indicates that somethings
wrong with the interpretation of the data:
cairo_surface_t* plotSurface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
800, 800);
const char* buf = reinterpret_cast<const char*>
(cairo_image_surface_get_data(surface));
unsigned long length = cairo_image_surface_get_stride(surface); // yields 3200
length *= cairo_image_surface_get_height(surface);
PoDoFo::PdfImage img(this);
PoDoFo::PdfMemoryInputStream istream(buf, length);
img.SetImageData(800, 800, 8, &istream);
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users