ImagenRawMask

@PublicPreviewAPI
class ImagenRawMask : ImagenMaskReference


Represents a mask for Imagen editing. This image should contain only black and white pixels, with black representing parts of the image which should not change.

Summary

Public constructors

ImagenRawMask(mask: ImagenInlineImage, dilation: Double?)

Public constructors

ImagenRawMask

ImagenRawMask(mask: ImagenInlineImage, dilation: Double? = null)
Parameters
mask: ImagenInlineImage

the mask image

dilation: Double? = null

the amount to dilate the mask. This can help smooth the borders of an edit and make it seem more convincing. For example, 0.05 will dilate the mask 5%.