On Fri, 24 May 2019 09:02:32 +0900, YAMAMOTO Mitsuharu wrote: > > As I mentioned in (*), the current image support on cairo has several > problems including this one. I'm thinking about porting the core part > of the image support code on the Mac port, to cairo. > > (*): https://lists.gnu.org/r/bug-gnu-emacs/2019-05/msg00205.html Patch attached. It makes cairo image support more consistent with the Xlib one. It supports postprocessing (:conversion ALGORITHM), mask removal (:mask nil), and image-mask-p. SVG images should look similar on both builds. Postscript support, which is marked obsolete, is dropped. Alpha channel (not the tRNS chunk in PNG) support for PNG and SVG is now easy on cairo, but not added in this patch, because it introduces some inconsistency with the Xlib one. It could be added as a separate change. YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp