New upstream version 24.0.1+dfsg1
This commit is contained in:
parent
b14f9eae6d
commit
5a730d6ec3
842 changed files with 42245 additions and 33385 deletions
|
|
@ -2,7 +2,7 @@
|
|||
#include "obsconfig.h"
|
||||
|
||||
#define MAGICKCORE_QUANTUM_DEPTH 16
|
||||
#define MAGICKCORE_HDRI_ENABLE 0
|
||||
#define MAGICKCORE_HDRI_ENABLE 0
|
||||
|
||||
#if LIBOBS_IMAGEMAGICK_DIR_STYLE == LIBOBS_IMAGEMAGICK_DIR_STYLE_6L
|
||||
#include <magick/MagickCore.h>
|
||||
|
|
@ -21,33 +21,34 @@ void gs_free_image_deps()
|
|||
}
|
||||
|
||||
uint8_t *gs_create_texture_file_data(const char *file,
|
||||
enum gs_color_format *format,
|
||||
uint32_t *cx_out, uint32_t *cy_out)
|
||||
enum gs_color_format *format,
|
||||
uint32_t *cx_out, uint32_t *cy_out)
|
||||
{
|
||||
uint8_t *data = NULL;
|
||||
ImageInfo *info;
|
||||
uint8_t *data = NULL;
|
||||
ImageInfo *info;
|
||||
ExceptionInfo *exception;
|
||||
Image *image;
|
||||
Image *image;
|
||||
|
||||
if (!file || !*file)
|
||||
return NULL;
|
||||
|
||||
info = CloneImageInfo(NULL);
|
||||
info = CloneImageInfo(NULL);
|
||||
exception = AcquireExceptionInfo();
|
||||
|
||||
strcpy(info->filename, file);
|
||||
image = ReadImage(info, exception);
|
||||
if (image) {
|
||||
size_t cx = image->magick_columns;
|
||||
size_t cy = image->magick_rows;
|
||||
data = bmalloc(cx * cy * 4);
|
||||
size_t cx = image->magick_columns;
|
||||
size_t cy = image->magick_rows;
|
||||
data = bmalloc(cx * cy * 4);
|
||||
|
||||
ExportImagePixels(image, 0, 0, cx, cy, "BGRA", CharPixel,
|
||||
data, exception);
|
||||
ExportImagePixels(image, 0, 0, cx, cy, "BGRA", CharPixel, data,
|
||||
exception);
|
||||
if (exception->severity != UndefinedException) {
|
||||
blog(LOG_WARNING, "magickcore warning/error getting "
|
||||
"pixels from file '%s': %s", file,
|
||||
exception->reason);
|
||||
blog(LOG_WARNING,
|
||||
"magickcore warning/error getting "
|
||||
"pixels from file '%s': %s",
|
||||
file, exception->reason);
|
||||
bfree(data);
|
||||
data = NULL;
|
||||
}
|
||||
|
|
@ -58,8 +59,10 @@ uint8_t *gs_create_texture_file_data(const char *file,
|
|||
DestroyImage(image);
|
||||
|
||||
} else if (exception->severity != UndefinedException) {
|
||||
blog(LOG_WARNING, "magickcore warning/error reading file "
|
||||
"'%s': %s", file, exception->reason);
|
||||
blog(LOG_WARNING,
|
||||
"magickcore warning/error reading file "
|
||||
"'%s': %s",
|
||||
file, exception->reason);
|
||||
}
|
||||
|
||||
DestroyImageInfo(info);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue