-
Notifications
You must be signed in to change notification settings - Fork 2
raylib.ImageFromChannel
JoeStrout edited this page Apr 29, 2026
·
2 revisions
Create an image from a selected channel of another image
| Parameter | Default Value | Note |
|---|---|---|
| image | ||
| channel |
| Condition | Return Value |
|---|---|
| (always) | map |
img = raylib.LoadImage("photo.png")
// Extract the red channel (channel 0) as a grayscale image
redChannel = raylib.ImageFromChannel(img, 0)
raylib.ExportImage redChannel, "red_channel.png"
raylib.UnloadImage redChannel
raylib.UnloadImage img