How to get the dimensions of an image with LC server ?

Alex Tweedly alex at tweedly.net
Sat Jun 23 13:08:30 EDT 2018


Short answer - just the same as with LC :-)

It wasn't there in the initial versions of LC, but for quite a ong time 
now the standard image functions have worked. Here's a quick (tested - 
on on-rev/sage) demo with an image I happened to have:

<?rev

import paint from file "images/ardenstur.jpg"
put the name of the last image into t
set the name of t to "Im1"

put the name of img "Im1" &CR
put the width of img "Im1" & cr

and it works as you'd expect.

Alex.


On 23/06/2018 17:30, jbv via use-livecode wrote:
> Hi list,
> IS there a way to get the dimensions (width & height) of an img
> (jpeg or png) with livecode server ? The image is located somewhere
> on the same server.
>
> Thanks in advance,
> jbv
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the Use-livecode mailing list