Comment 6 for bug 168708

Cairo 1.10 supports embedding of JPEG and other formats in PS/PDF.

The cairo_surface_set_mime_data() function is used to attach the JPEG data to in image surface. Then if the backend supports JPEG it wil used the JPEG data instead of the image data.

http://www.cairographics.org/manual/cairo-cairo-surface-t.html#cairo-surface-set-mime-data