From 288b65a1fd6bcb1908a31c0a3e18ce7b6bf53a89 Mon Sep 17 00:00:00 2001 From: yzrh Date: Sun, 25 Dec 2022 01:26:05 +0000 Subject: Handle different JPEG colour component. Signed-off-by: yzrh --- src/jpeg.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/jpeg.c') diff --git a/src/jpeg.c b/src/jpeg.c index 4ea4d7f..cdcae7b 100644 --- a/src/jpeg.c +++ b/src/jpeg.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2021, yzrh + * Copyright (c) 2020-2022, yzrh * * SPDX-License-Identifier: Apache-2.0 */ @@ -9,7 +9,7 @@ #include int -strinfo_jpeg_dim(int *jpeg_width, int *jpeg_height, +strinfo_jpeg_dim(int *jpeg_width, int *jpeg_height, int *jpeg_components, const char * restrict data, int data_size) { struct jpeg_decompress_struct cinfo; @@ -27,6 +27,7 @@ strinfo_jpeg_dim(int *jpeg_width, int *jpeg_height, *jpeg_width = cinfo.output_width; *jpeg_height = cinfo.output_height; + *jpeg_components = cinfo.output_components; jpeg_destroy((struct jpeg_common_struct *) &cinfo); -- cgit v1.2.3