revBrowser - Scaling

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dickey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 114
Joined: Wed Apr 08, 2009 11:54 pm
Location: Shellharbour, Australia

revBrowser - Scaling

Post by dickey » Mon Dec 14, 2009 1:02 pm

Good evening all,

I see I am not the only developer thinking about revBrowser tonight (hello sturgis).

I was wondering whether it is possible to create a revBrowser object of a certain rect (dimension), and display the web page content fully - scaled to fit the rect of the object, akin to a large thumbnail displaying the live url in question.

I couldn't see anything in revBrowserSet that might work, but perhaps I could represent the thumbnail sized site by capturing and scaling a static image of the url first using revBrowserSnapshot. Then when the user clicks the static thumbnail, launch a larger revBrowser object displaying live the url represented by the static and scaled image.

If anyone has a better solution (one that does not involve the pre-capture of static images), your assistance would be appreciated.

Merry Christmas, Andrew

oliverk
Site Admin
Site Admin
Posts: 53
Joined: Mon Feb 27, 2006 2:16 pm
Location: Edinburgh

Re: revBrowser - Scaling

Post by oliverk » Tue Dec 15, 2009 2:50 pm

Hi Andrew,

Off the top of my head I can't think of another way of doing this apart from using revBrowserSnapshot. There may be command-line utilities or something that can help you depending on which platforms you need to support.

Another thing that may be worth thinking about is just creating a fixed image to use for this purpose and storing it in the stack. For example if the browser will always be set to a known url, you could create an image to represent that site and use that, avoiding the extra complexity. If the url is variable, maybe a more general image that represents a web page or browser might suffice?

Regards
Oliver
Oliver Kenyon
Software Developer
Runtime Revolution

ale870
Posts: 250
Joined: Tue Apr 22, 2008 9:17 am
Contact:

Re: revBrowser - Scaling

Post by ale870 » Wed Dec 16, 2009 9:33 am

Hello,

there is a program use to grab the whole web page, maybe you could check if you can use it (or a similar) via OpenProcess (or similar):

http://www.websitescreenshots.com/

Cheers!
Runtime Revolution Widgets, tutorials, tips & tricks and more!
http://runrevwidgets.com/wiki

ale870
Posts: 250
Joined: Tue Apr 22, 2008 9:17 am
Contact:

Re: revBrowser - Scaling

Post by ale870 » Wed Dec 16, 2009 9:34 am

This program seems can take a screenshot to a file via commandline:

http://www.nirsoft.net/utils/web_site_screenshot.html

EDIT: look for in google for this search:

take screenshot whole web page command-line

I found a lot of tools!
Runtime Revolution Widgets, tutorials, tips & tricks and more!
http://runrevwidgets.com/wiki

dickey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 114
Joined: Wed Apr 08, 2009 11:54 pm
Location: Shellharbour, Australia

Re: revBrowser - Scaling

Post by dickey » Wed Dec 16, 2009 11:01 am

Thanks Oliver, most appreciated.

Yes, in the absence of being able to scale the live representation of the web site (I haven't quite given up fully on that yet. Thinking, thinking...), I will probably look to pre-capture, store and regularly re-capture the images to maintain their currency. I have written a web robot/crawler for that purpose.

I am a little unsure of the format choices for images captured with revBrowserSnapshot assuming I push the solution in that direction. According to the Rev Dictionary you declare a variable before calling revBrowserSnapshot, but no mention is made of format of that capture. I do need to focus somewhat on the saved image format and file size given that for this project I expect to have to process representations for several million URIs/URLs, both live on the web and archived within an intranet.

As a side issue, whilst we are discussing the revBrowser. Oliver, I understand revBrowser is not available (right now) within the RevWeb Plug-in, however if it were I believe I could execute a very nice media application/project using the Rev Web Plug-in. Just a thought.

Thanks again for your interest, Merry Christmas,

- Andrew

dickey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 114
Joined: Wed Apr 08, 2009 11:54 pm
Location: Shellharbour, Australia

Re: revBrowser - Scaling

Post by dickey » Wed Dec 16, 2009 11:04 am

Thanks ale870 for posting,

I am checking out your suggestions as I write, as one maybe more efficient, and result in smaller file sizes than those I have acheived to date.

Thanks again for your interest, Merry Christmas,

- Andrew

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”