[cairo] [PATCH] Enable links to image files in SVG backend

Kouhei Sutou kou at cozmixng.org
Fri Jan 1 02:07:37 PST 2010


Hi,

In <4B3DC232.4060109 at redneon.com>
  "Re: [cairo] [PATCH] Enable links to image files in SVG backend" on Fri, 01 Jan 2010 20:06:50 +1030,
  Adrian Johnson <ajohnson at redneon.com> wrote:

> Alexander Shulgin wrote:
>> [1] Again, I'm doing my stuff in Ruby, and I found no way to obtain
>> necessary image data from JPEG file to feed to
>> cairo_image_surface_create_for_data().  Using gdk-pixbuf is of no help
>> as it gives BGR instead of RGB expected by cairo (or vice-versa).

rcairo can render a Gdk::Pixbuf:

  context.save do
    context.set_source_pixbuf(pixbuf, 0, 0)
    context.paint
  end


Thanks,
-- 
kou


More information about the cairo mailing list