mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-17 07:16:03 +00:00
WARNING: API BREAK: Removed LoadImagePro()
Actually this function is useless and potentially dangerous, internally, a shallow copy of data was done. Same could be accomplished accesing image.data directly.
This commit is contained in:
@@ -332,23 +332,6 @@ Image LoadImageEx(Color *pixels, int width, int height)
|
||||
return image;
|
||||
}
|
||||
|
||||
// Load image from raw data with parameters
|
||||
// NOTE: This functions makes a copy of provided data
|
||||
Image LoadImagePro(void *data, int width, int height, int format)
|
||||
{
|
||||
Image srcImage = { 0 };
|
||||
|
||||
srcImage.data = data;
|
||||
srcImage.width = width;
|
||||
srcImage.height = height;
|
||||
srcImage.mipmaps = 1;
|
||||
srcImage.format = format;
|
||||
|
||||
Image dstImage = ImageCopy(srcImage);
|
||||
|
||||
return dstImage;
|
||||
}
|
||||
|
||||
// Load an image from RAW file data
|
||||
Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize)
|
||||
{
|
||||
|
Reference in New Issue
Block a user