Image size variation

The requirement is extracting the images and saved into new document.For the extraction process using paragraph node and fig caption as keyword. In my code i have separate the image handling in following ways
Section A-handling figures with caption as previous
Section B-handling images with caption as nextsibling
Section C-handling images inside the table
Section D-handling images landscape mode

The issue is fig 1 is expanded from its original size.please kindly help me to solve the issue.

The source codesource.zip (8.3 KB)

The input is test.zip (1.9 MB)

The actual output actual output.zip (1.9 MB)

Regards
pria

@akshayapria,

Thanks for your inquiry. The size of image is same in input and output documents. Please check the attached images for detail.
output.png (45.7 KB)
input.png (67.7 KB)

Please share some more detail about your issue. We will then provide you more information on this.