Re: Centering image within an iframe
An admittedly expensive workaround would be to read the image at the server, base64-encode it, and include it in a data: URI, either as the src of an img or as the background-image of the framed page's CSS (with a background-attachment of center center and a background-repeat of no-repeat). If you've never used a data: URI before, it would look like this:
Code:
<img src="data:image/jpg;charset=utf-8;base64,base64-encoded_image_file_goes_here">
That gives you a lot of options, including serving the image directly on your page without incurring the HTTP_REFERER penalty, so you can do pretty much whatever you want at that point. It is bandwidth and computationally expensive, though, so it may not be practical in your situation (particularly if this needs to scale).
“Beware of bugs in the above code; I have only proved it correct, not tried it.” --Donald Knuth
"It was as if its architects were given a perfectly good hammer and gleefully replied, 'neat! With this hammer, we can build a tool that can pound in nails.'" -- Alex Papadimoulis (on TheDailyWTF.com)