WordPress.org

Ready to get started?Download WordPress

Forums

wp_create_thumbnail [how to make custom border] (2 posts)

  1. _rg_
    Member
    Posted 7 years ago #

    I need to make that the function (wp_create_thumbnail) makes a diferent border to the thumbnail or not to make it, but i coludnĀ“t get the part of the code that do it.

  2. _rg_
    Member
    Posted 7 years ago #

    ok, i could find how to do it... if anybody needs it:

    in the "admin-functions.php" i add this line:
    @ imagerectangle ( $thumbnail, $xstart, $ystart, $xend, $yend, $lineColor);

    after this one:
    @ imagecopyresampled($thumbnail, $image, 0, 0, 0, 0, $image_new_width, $image_new_height, $image_attr[0], $image_attr[1]);

    ref:
    $xstart and $ystart are the [left,top] point of the image.
    $xend and $yend are the [right, bottom] point of the image.
    $lineColor guess what??!! yes the line color.

Topic Closed

This topic has been closed to new replies.

About this Topic