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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Richard Gaskin via use-livecode
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
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

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

Richard Gaskin via use-livecode
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
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

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

Richard Gaskin via use-livecode
Hi Alex,
Indeed it works.
Thank you very much.

On Sat, June 23, 2018 7:08 pm, Alex Tweedly via use-livecode wrote:

> 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 [hidden email] Please visit this
>> url to subscribe, unsubscribe and manage your subscription preferences:
>>  http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
> _______________________________________________
> use-livecode mailing list [hidden email] Please visit this
> url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode