Merge pull request #1191 from hwhw/master

(really?) fix refresh viewport calculations
add support for GIF and PNG to picdocument provider

needs update to latest base
update to latest base