aboutsummaryrefslogtreecommitdiffstats
path: root/src/jpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/jpeg.c')
-rw-r--r--src/jpeg.c5
1 files changed, 3 insertions, 2 deletions
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 <yzrh@noema.org>
+ * Copyright (c) 2020-2022, yzrh <yzrh@noema.org>
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -9,7 +9,7 @@
#include <jpeglib.h>
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);