What steps will reproduce the problem?
- Using timthumb without specifing width or height
What is the expected output?
- The other dimension should be calculated.
What do you see instead?
- The other dimension is set to a default value of 100
There's a quick fix for the problem: set the other dimension to zero.
So for example:
timthumb.php&w=300h=0&src=image.jpg
In this case timthumb calculate the height.
Or change lines 32 and 33 from
$new_width = preg_replace( "/[^0-9]+/", "", get_request( 'w', 100 ) );
$new_height = preg_replace( "/[^0-9]+/", "", get_request( 'h', 100 ) );
to
$new_width = preg_replace( "/[^0-9]+/", "", get_request( 'w', 0 ) );
$new_height = preg_replace( "/[^0-9]+/", "", get_request( 'h', 0 ) );
Regards,
Valentino Aluigi
Original issue reported on code.google.com by valentin...@gmail.com on 20 Jan 2009 at 11:33
Original issue reported on code.google.com by
valentin...@gmail.com
on 20 Jan 2009 at 11:33