I have got a code line like this:
<?php the_title_attribute(); ?>”><img src=”<?php bloginfo( ‘template_directory’ ); ?>/timthumb.php?src=<?php echo get_post_meta( $post->ID, “image_value”, true ); ?>&w=521&h=246&zc=1″ alt=”<?php the_title(); ?>” />
Defined “h” parameter is 521 pixels and it is OK. But my question is, how to define “w” parameter to match to “h” parameter? What do I mean? For example, I have got a picture like this 1024×768. Now, the script will resize wide from 1024 to 521 pixels and cut the high to 246 pixels. And I want to resize wide from 1024 to 521 but I want to resize the high to 390 pixels. In that case, the original picture and resized picture would look the same. The resized picture would not be cutted. Another example. I have got picture 600×960 pixels After timthumb resize I have got 521×246 cuted picture. But I want to have a 521×833 uncuted proportional picture. Just resized – not cuted. Can you help me and write to me, how can I define “w” parameter to match to predefined “h” parameter as 521 pixels?
- The topic ‘TimThumb – how to define "h" parameter, to match to "w"?’ is closed to new replies.