Use output_width/height in avifJPEGCopyPixels()
Use cinfo->output_width/height instead of cinfo->image_width/height in
avifJPEGCopyPixels() because cinfo->output_width/height is the
resolution of the pixels jpeg_read_raw_data() produces.
Suggested by Yuan Tong in
https://github.com/AOMediaCodec/libavif/pull/1069#discussion_r4034202339.
diff --git a/apps/shared/avifjpeg.c b/apps/shared/avifjpeg.c
index 426c5d0..0126cd2 100644
--- a/apps/shared/avifjpeg.c
+++ b/apps/shared/avifjpeg.c
@@ -54,8 +54,8 @@
cinfo->raw_data_out = TRUE;
jpeg_start_decompress(cinfo);
- avif->width = cinfo->image_width;
- avif->height = cinfo->image_height;
+ avif->width = cinfo->output_width;
+ avif->height = cinfo->output_height;
if (avif->width > sizeLimit / avif->height) {
return AVIF_FALSE;
}