get image size from timthumb

Get help with installation and running PivotX 2.0.x here. Please do not post Extension or Theme related questions here.

get image size from timthumb

Postby ruthenoid » Thu Jul 16, 2015 1:04 pm

How can I get the new image size from timthumb.php?
i'm using a bonusgallery which doesn't give me image dimensions ($width, $height)
I have read about getimagesize() but i don't know how to implement it.
Code: Select all
[[ assign var=dims value=getimagesize($image->src) ]]
[[ print_r var=$dims]]

gives me nothing, and
Code: Select all
[[php]]
   $dims = getimagesize($image->src);
   printf($dims);
[[/php]]

also gives nothing.
ruthenoid
 
Posts: 12
Joined: Mon Jul 12, 2010 8:00 pm

Re: get image size from timthumb

Postby Harm10 » Sat Jul 18, 2015 9:26 am

If I code this
Code: Select all
[[php]]
list($width, $height, $type, $attr) = getimagesize('../images/abc.jpg');
echo 'width: ' . $width . ' height: ' . $height;
[[/php]]

it just works (the image abc.jpg has to exist obviously).
Are you sure you got the image construction right?
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Harm10
Developer
 
Posts: 2010
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)


Return to 2.x Support Forum

Who is online

Users browsing this forum: No registered users and 7 guests

cron