Older Newer
Sun, 16 Feb 2020 01:45:54 . . . . SyneRyder [Initial variable definition]


Changes by last author:

Added:
= planesWithoutAlpha =

== Syntax ==

int planesWithoutAlpha

== Description ==

planesWithoutAlpha contains the number of image channels without alpha channels. For example, an RGB image would return 3 planes, and a CMYK image would return 4 planes, no matter how many alpha channels it also has. You can now calculate the number of available alpha channels by subtracting planesWithoutAlpha from planes or Z.

== Example ==

<code>

int totalPlanes = planes;

int colorPlanesOnly = planesWithoutAlpha;

int alphaPlanes = planes - planesWithoutAlpha;

printf("Total channels/planes: %d\nColor planes only: %d\nAlpha channels: %d", totalPlanes, colorPlanesOnly, alphaPlanes);

</code>

== See Also ==

planes, Z