revBrowserSnapshot - skewed image?

Bernard Devlin bdrunrev at
Fri Feb 5 10:27:25 EST 2010


I'm trying to use the revBrowserSnapshot command and I'm getting
mangled images.

I'm using the sample code from the dictionary, and using 2 copies of
the sample InetBrowser stack that comes with Rev.  I've tried with
both Rev Studio 3.5 (OS X PPC) and Rev Enterprise 4.0 (Vista).  In
both cases I'm getting skewed images.  Obviously this is not an issue
with one version of Rev, or even confined to one browser/external.

Basically anyone should be able to try and reproduce this and help me
see where I'm going wrong.

Within the Rev install directory open Resources/Examples/Browser Sampler
Click the 'Launch Browser' button on the first card of that stack
Wait for the runrev page (the default) to open up in the browser sampler
In the MB type 'Clone this stack'
Switch the browser off on the cloned copy (to reveal the underlying img control)
Create a button on the original stack with this script:

on mouseUp
   local tSnapshot
   revBrowserSnapshot 1, "tSnapshot" -- assumes that you haven't
killed the first instance of revBrowser launched on opening this stack
   set the imageData of image "BrowserImage"  of stack "Copy of
InetBrowser" to tSnapshot
end mouseUp

Click your new button on the original stack.  On the cloned stack you
should see the image is skewed.  I thought this might be due to the
lockLoc of the img control on the cloned stack being true.  But even
setting that to false makes no difference.

Any idea what the problem is here?  Is the sample code from the
dictionary missing something?

I'm really puzzled by this.  I've searched through RQCC and can find
no mention of any problem with this command.  In fact, in the "Browser
Sampler" stack if one clicks through to cd 10, there is an example of
making a thumbnail of a page, and that too produces a distorted image.


More information about the Use-livecode mailing list