@thecore762
Quote:
Originally Posted by Mooff
I do not own vb_advanced. Therefore i have no idea.
Since the db_query is build upon the vb4-cms article database/table structure i have to go with "probably not". Maybe an experienced coder who does have vb advanced can clearify on that one.
|
btw. since i read about cropping and was curious whether this would be hard to do with gd i just checked it out:
(untested)
The catch: The simple version needs your pictures to be bigger than the result. Can be worked around though i think. Without someone actually wanting it i won't check into it more though - simply cause we do not need it right now
anyway, for cropping
find
Code:
$img_width = $imageinfo[0];
$img_height = $imageinfo[1];
imagecopyresampled($sprite, $image, 0, 0, 0, 0, $maxwidth, $maxheight, $img_width, $img_height );
imagedestroy($image);
replace with
Code:
$img_width = $imageinfo[0];
$img_height = $imageinfo[1];
if($img_height > $maxheight AND $img_width > $maxwidth)
{
$cropy = $img_height - $maxheight;
$cropx = $img_width - $maxwidth;
imagecopyresampled($sprite, $image, 0, 0, $cropx, $cropy, $maxwidth, $maxheight, $img_width, $img_height );
}
else
{
imagecopyresampled($sprite, $image, 0, 0, 0, 0, $maxwidth, $maxheight, $img_width, $img_height );
}
imagedestroy($image);
(if someone uses this one, please report back to me if it does work - i do not have a testboard right now, so no testing

)