Are you using Power Gallery 2?
in power gallery 2 on the chose design page, you can edit the design, when editing the design, you can set the size for the images.
you set the large image size to be a size to fit in the iframe
also, the iframe style tag:
style="width:100%; height=900px;
should be:
style="width:100%; height:900px;