paulhammond / webkit2png

png screenshots of webpages
http://www.paulhammond.org/webkit2png/
1.44k stars 196 forks source link

clip size can override user-requested size for fullsize screenshot #75

Open j-h-a opened 10 years ago

j-h-a commented 10 years ago

Description Output image is too big when user-requested size is smaller than internally grabbed image size.

To reproduce

webkit2png -W 800 -H 480 http://localhost:8080 -F

Expected behaviour Output image should be 800x480

Actual behaviour Output image is 800x600.

Proposed Solution If user-requested fullsize grab is smaller than the internally grabbed size (if grabbed size is expanded to ensure the clipped thumb has enough content) then the final output for the fullsize image should be cropped to the user-requested size.

Workaround Until fixed, users can add --scale=1 (in cases where clipped thumb is not wanted).