mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 21:15:32 +09:00
fix(media-proxy): serve large simple jxl, fit full size (#3408)
This commit is contained in:
1 parent
f8d3c70a91
commit
86e29b61e3
24 files changed
+345
-72
No files matched your search
@@ -41,13 +41,15 @@ void fluxer_vips_tune_for_server(int per_pipeline_threads) {
|
||||
vips_leak_set(FALSE);
|
||||
}
|
||||
|
||||
int fluxer_vips_probe_animated(const void *buf, size_t len, int *width, int *height, int *pages) {
|
||||
if (width == NULL || height == NULL || pages == NULL) {
|
||||
int fluxer_vips_probe_animated(const void *buf, size_t len, int *width, int *height, int *pages, int *bands, int *format) {
|
||||
if (width == NULL || height == NULL || pages == NULL || bands == NULL || format == NULL) {
|
||||
return FLUXER_NATIVE_STATUS_CODEC_FAILURE;
|
||||
}
|
||||
*width = 0;
|
||||
*height = 0;
|
||||
*pages = 0;
|
||||
*bands = 0;
|
||||
*format = VIPS_FORMAT_NOTSET;
|
||||
if (buf == NULL || len == 0) return FLUXER_NATIVE_STATUS_CODEC_FAILURE;
|
||||
VipsImage *header = vips_image_new_from_buffer(buf, len, "n=1", NULL);
|
||||
if (header == NULL) {
|
||||
@@ -82,6 +84,8 @@ int fluxer_vips_probe_animated(const void *buf, size_t len, int *width, int *hei
|
||||
*width = display_width;
|
||||
*height = display_height;
|
||||
*pages = n_pages;
|
||||
*bands = vips_image_get_bands(display_header);
|
||||
*format = vips_image_get_format(display_header);
|
||||
g_object_unref(display_header);
|
||||
g_object_unref(header);
|
||||
return FLUXER_NATIVE_STATUS_OK;
|
||||
|
||||
Reference in new issue
Block a user