I don’t know if TimThumb is really necessary. You could easily do that with internal WordPress functions.
Add this code to your functions.php:
<?php
add_theme_support( 'post-thumbnails' ); // this enable thumbnails
add_image_size( 'preview-thumb', 300, 185, true ); //this sets your default size
?>
Use the following code instead of your code above.
<div class="main">
<div class="view view-first">
<h4><a href="https://wordpress.stackexchange.com/questions/126373/<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h4>
<div class="myimage">
<?php
if ( has_post_thumbnail())
{
$thumb = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'preview-thumb' );
echo '<img src="' . $thumb[0] . '">';
} else {
echo 'No post thumbnail.';
}
?>
</div>
<div class="mask">
<?php
if ( has_post_thumbnail())
{
$full = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'full' );
echo '<a href="' . $full[0] . '">Some text.</a>';
} else {
echo 'No post thumbnail.';
}
the_content_limit($hp_mid_content_length,'');
?>
</div>
</div>
</div>
Then follow these steps to add a post thumbnail.