mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-09 16:38:07 +00:00
The version 7 file format specification gives `XI` and `XF` an ImageMask operand: 0 is an opaque image, 1 is an image that is transparent and can be colorized (sections 8.1, 8.2 and the 1-bit examples in 8.4, https://13thmonkey.org/documentation/fonts/AI7FileFormat.pdf). The reader ignored the operand, so a 1-bit image mask opened as an opaque black-and-white image. A 1-bit gray image with ImageMask 1 now opens with the fill color set before it as the color that colorizes it. A spot or global color keeps its swatch and tint. When the fill is a pattern, a gradient or none, the image is colorized black. VectorCraft's own rule is that the pixels that open black with ImageMask 0 take the color and the others are transparent. A linked image (`XF`) keeps the same color for when its file is relinked. 8-bit gray, RGB and CMYK images, and images with ImageMask 0, open as before.