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
   $dims = getimagesize($image->src);

also gives nothing.
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
list($width, $height, $type, $attr) = getimagesize('../images/abc.jpg');
echo 'width: ' . $width . ' height: ' . $height;

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!
Posts: 2011
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: Exabot [Bot] and 8 guests