Skip to main content

No Alpha Channel

Detects and corrects images with transparent pixels.

Parameter table

No parameter available.

Detailed description

The image validation algorithm of this rule checks if the image has an alpha channel, which represents transparency. If the image has no alpha channel (i.e., it has only three color channels), it is considered valid. Otherwise (i.e., it has four color channels), it further examines each pixel to ensure that there are no transparent pixels. If any transparent pixels are found, a validation error is raised, indicating the presence of transparency.

Correction

The correction process of this rule aims to remove transparency from the image. It sets the alpha channel to 255 for all pixels with transparency, effectively making the entire image opaque.

Additionally, pixels that were originally fully transparent (alpha channel = 0) are replaced with a distinctive pattern. This pattern, commonly seen in media viewers when rendering images with transparent backgrounds, consists of alternating white and grey squares. This replacement ensures that previously transparent areas are visually distinguishable and maintains the overall appearance of the corrected image.

The format of the corrected image is PNG.

Creator tips

  • Ensure your image does not have a transparent background when it is not intended to have one.
  • Be aware that the correction process may alter the appearance of the image by making the background opaque.

Examples

valuevaliddescription
Spritesheet With Transparent BackgroundThe image should not have transparent pixels.
Spritesheet With Green BackgroundThe image should not have transparent pixels.