-
AuthorPosts
-
Anonymous Moderator
JA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
May 29, 2009 at 8:15 am #141528Question:
I really like JA Topaz but have a problem. When I insert an image a black border is shown around it. The image seems to be rewritten.
All other templates dont seem to have this problem. Can You fix it?
Answer: You see this issue because we are using the cropping mode to crop images and your image is very small. It will auto add a black border.
To remove this issue, you have change the mode from cropping image to resized image. To change it, please open templatesja_topazja_templatetools_1.5.php file, at about line 412, find following code:
[PHP]if ($image) {
if ($autoresize && function_exists(‘imagecreatetruecolor’)
&& ($image1 = JA_Tools::processImage ( $params[‘src’], $width, $height ))) {
//$image = “<img src=””.$image1.”” alt=”{$row->title}” $align />”;
$params[‘src’] = $image1;
} else {
if ($width) $params[‘width’] = $width;
if ($height) $params[‘height’] = $height;
}
$image = ”;
foreach ($params as $k=>$v) $image .= ” $k=”$v””;
$image = “<img$image />”;
} else $image = ”;[/PHP]and change to:
[PHP]
$crop = 0; /* 1- crop ; 0 – resized */
if ($image) {
if ($autoresize && function_exists(‘imagecreatetruecolor’)
&& ($image1 = JA_Tools::processImage ( $params[‘src’], $width, $height, $crop ))) {
//$image = “<img src=””.$image1.”” alt=”{$row->title}” $align />”;
$params[‘src’] = $image1;
} else {
if ($width) $params[‘width’] = $width;
if ($height) $params[‘height’] = $height;
}
$image = ”;
foreach ($params as $k=>$v) $image .= ” $k=”$v””;
$image = “<img$image />”;
} else $image = ”;[/PHP]Hope it helps.
sfpkent Friendsfpkent
- Join date:
- October 2008
- Posts:
- 829
- Downloads:
- 0
- Uploads:
- 100
- Thanks:
- 310
- Thanked:
- 75 times in 1 posts
June 1, 2009 at 8:53 am #306384Sorry, it’s not working. the black border still there. I can’t show you the link coz I do it on my computer. Is there any way to solve it?
theprofessor Friendtheprofessor
- Join date:
- March 2009
- Posts:
- 365
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 47
- Thanked:
- 64 times in 18 posts
June 1, 2009 at 8:56 am #306385I haven’t tried it, but thanks for the tip! I was wondering how to do that.
I don’t like using borders at all…tends to look a little ‘bloggy’.
Anonymous ModeratorJA Developer
- Join date:
- September 2014
- Posts:
- 9914
- Downloads:
- 207
- Uploads:
- 152
- Thanks:
- 1789
- Thanked:
- 2008 times in 1700 posts
June 1, 2009 at 8:58 am #306386Hi sfpkent
I think there are some problems with your changed. If possible, please kindly send me your live url, ftp account. I want to check your modification
-
AuthorPosts
This topic contains 5 replies, has 4 voices, and was last updated by slart 15 years, 6 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum