[DVIPDFMx] New feature of dvipdfmx, image mask

Jin-Hwan Cho chofchof at suwon.ac.kr
Fri May 30 10:24:57 KST 2008


Yesterday, I uploaded a new code enabling image mask in dvipdfmx.

Actually, the idea came from the PGF manual (not version 2 but version  
1).
I didn't notice that the new version of PGF came out a few months ago.

Anyway, we need two images, one is original (maybe with colors) and
the other is masking image (usually with gray colors).

To support this feature, I extended the specail "pdf:image" as follows:

pdf: image @object_name options (filename) << attribute_dictionary >>

Here << attribute_dictionary >> is new. In the case of XObject images,
there was no way to give explicit information after loading the image.
So extra information can be given in the dictionary form << ... >>.

Moreover, there is a new option "mask". With this option, the special
does not put the image on the paper. It will be used just for masking.

Therefore, the basic usage is as follows:

\special{pdf:image @mymask mask (mask-image.jpg) <</Matte[1 1 1] / 
Decode[1 0]>>}
\special{pdf:image (real-image.jpg) <</SMask @mymask>>}

For these specials, I updated dvipdfmx.def and uploaded a sample too.

Any comment is welcome.

Best regards, ChoF.




More information about the dvipdfmx mailing list