Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • Anonymous Moderator
    #141528

    Question:

    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 Friend
    #306384

    Sorry, 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 Friend
    #306385

    I 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 Moderator
    #306386

    Hi 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

    slart Friend
    #308535

    Thank you, i had trouble with resizing the image (orange background, cutten image), now it works fine after copying your proposal.

    Thanks

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 4 voices, and was last updated by  slart 15 years, 5 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum