Once the layer is selected I want to create a mask which should has the shape of the current layer's contents. And the mask should be linked to the layer so that if the user resizes the layer the mask layer should also resize along with it.
Do you mean to say that I should copy the layer's content to another layer and convert it to mask?
If I do this then the mask will be uneven. I need even color in the mast which is either black or white nothing in between.
The mask image will need to be ie8g. So you will probably need to convert the layer bitmap.
How can I convert a layer to ie8g?
If I use this: ImageEnView1.Proc.ConvertTo(ie8p, ieptFixedHalftone256, iedtOrdered8x8); then will the LegacyBitmap become true? I want to keep LegacyBitmap properly to false always as the images the software has to work with are very large in size.