Add new comment

pixel position of thumbnail image vs. of raw image

Dear Alex,
first of all, many thanks for the wonderful libraw and your effort.

I'm currently dealing with Canon R5 CR3.
I can sucessfully decode the largest thumbnail(JPEG 1620x1080) using this following code.
//--------------------
rawp->unpack_thumb_ex(1);
rawimgthumb = rawp->dcraw_make_mem_thumb(&err); //store unpacked and processed raw image

Mat rawData(1, rawimgthumb->data_size, CV_8UC1, (void*)rawp->imgdata.thumbnail.thumb);
thumbimg_file = imdecode(rawData, 1); //BGR
//--------------------

Howerver, it seems that the start pxiel(left-top conner) of the decoded thumbnail image is not the same of the start pixel of the raw image(8191x5463 or with frame 8352x5586).

How can we match the exackt position between the thumbnail and the raw image?
Is there any parameter about the croping region of the thumbnail from raw image?

Thank you for your response in advance.

Kim

Kim