Getting the dimensions of an image attached to a control item

I’m sure I’ve done this before but can’t find an example of how I can retrieve the x & y dimensions of an image from a standard action-file control.
Any suggestions?
Thanks in advance,
Tim.

FreewayActions.com - Freeware and commercial Actions for Freeway Express & Pro - http://www.freewayactions.com


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Any ideas on this? I’m using an AppleScript at the moment but could do with porting this over to just using Freeway if possible.
Thanks,
Tim.

Experienced Freeway designer for hire - http://www.freewayactions.com


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Without reading in the raw binary data as a FWFile and reading the first N bytes to find the geometry? Oh, and what of “bigendian” files – would have to read the LAST N bytes of those! I am afraid this would be a lot of work, but if you can find a way to do it, the various Lightbox scripts would thank you immensely!

Walter

On Mar 1, 2013, at 10:05 AM, Tim Plumb wrote:

Any ideas on this? I’m using an AppleScript at the moment but could do with porting this over to just using Freeway if possible.
Thanks,
Tim.

Experienced Freeway designer for hire - http://www.freewayactions.com


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Tim,

Try this:

var image = new FWImage(“/Path/To/Image.jpg”);
var height = image.fwBitmapHeight;
var width = image.fwBitmapWidth;

Joe

On 28 Feb 2013, at 14:21, Tim Plumb email@hidden wrote:

I’m sure I’ve done this before but can’t find an example of how I can retrieve the x & y dimensions of an image from a standard action-file control.


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Joe!

On 1 Mar 2013, at 16:40, Joe Billings wrote:

Hi Tim,

Try this:

var image = new FWImage(“/Path/To/Image.jpg”);
var height = image.fwBitmapHeight;
var width = image.fwBitmapWidth;

Joe


FreewayStyle.com - Free Freeway templates and parts to download, use and explore - http://www.freewaystyle.com


actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options