Info

Reports the size, pixel format and channels of a texture.

Inputs

NameTypeDescription
InputTextureThe texture to report on.

Parameters

NameTypeDescription
Has TextureoutputBoolWhether a texture is connected and has something in it. When off, the other outputs are zero or None.
SizeoutputVector 2 IntThe width and height of the texture in pixels.
FormatoutputEnumThe pixel format, such as RGBA (u8). Connected to the Format of another texture operator, it gives that operator the same format.
Channel CountoutputIntThe number of channels per pixel, from 1 for gray up to 4 for red, green, blue and alpha.
Has AlphaoutputBoolWhether one of the channels is alpha, the see-through channel.

The Info operator reports what a texture is made of, without changing it or passing it on. Use it to let a graph adapt to its input, for example to render at the size of a loaded picture.

A format’s name lists the channels and then how each one is stored. RGBA (u8) has four channels of 8 bits each, with values from 0 to 1, which is what most pictures are. A u is unsigned and an s is signed, so s8 runs from -1 to 1. With int added, the channels hold whole numbers, and an f marks floating point numbers, which can go beyond 0 to 1. sRGB means the colors are stored in the curve most screens use.

Keywords: size, resolution, width, height, format, channels, alpha, properties, inspect