[rtextures] Created ImageFromChannel() (#4105)

* created ImageFromChannel

Adds the possibility to extract a specific channel from an image

* naming convention

* example window height

* removed threshold

* removed alpha channel

* channel example organization

* updated channel example image
This commit is contained in:
Bruno Cabral 2024-06-30 01:33:32 -07:00 committed by GitHub
parent 5b8efd68ba
commit 6e2661f92d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 309 additions and 0 deletions

View file

@ -1334,6 +1334,7 @@ RLAPI Image ImageCopy(Image image);
RLAPI Image ImageFromImage(Image image, Rectangle rec); // Create an image from another image piece
RLAPI Image ImageText(const char *text, int fontSize, Color color); // Create an image from text (default font)
RLAPI Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Color tint); // Create an image from text (custom sprite font)
RLAPI Image ImageFromChannel(Image image, int selectedChannel); // Create an image from a selected channel of another image
RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format
RLAPI void ImageToPOT(Image *image, Color fill); // Convert image to POT (power-of-two)
RLAPI void ImageCrop(Image *image, Rectangle crop); // Crop an image to a defined rectangle