Skip to main content
Known Participant
November 2, 2009
Answered

ImageSharpen & Black Border

  • November 2, 2009
  • 1 reply
  • 1631 views

Whenever I use the ImageSharpen function, it adds a black border around inside pixels—it works different than the "border" tag in that it doesn't add the border to the image dimensions, it overwrites all the pixels around the image.

How can I turn this off?

    This topic has been closed for replies.
    Correct answer -__cfSearching__-

    We have all the cumulative hotfixes installed and the newest hotfix to solve the image locking problem already. I couldn't find anything about borders in any of the cumulative hotfix explanations, but the documentation is a little thin on those, too.


    That seems to be a known issue with certain sharpening methods. I do not know if this was fixed in CF9. But for CF8 the work-around seems to be using a different method for sharpening.

    A brief peek confirmed these popular image components seems to using java's ConvolveOp class as a work-around for the ImageSharpen issue

    http://www.alagad.com/projects.imageComponent

    http://www.opensourcecf.com/imagecfc/

    http://imageutils.riaforge.org/

    If you are interested, here is a good article explaining how sharpening works with java's ConvolveOp class and how to avoid the black border issue. http://www.informit.com/articles/article.aspx?p=1013851&seqNum=5&rll=1

    1 reply

    Inspiring
    November 2, 2009

    Can you post a screen shot of the result?

    Known Participant
    November 2, 2009

    And the code to get this result:

    <cfset ImageSetAntialiasing(eventThumb,"on")>
    <cfset ImageSharpen(eventThumb,2)>

    <cfimage source="#eventThumb#" action="write" destination="#graphicPath#/thumbs/#fileName#" overwrite="yes">

    ilssac
    Inspiring
    November 2, 2009

    Have you checked the hot fixes and updates?  Are you current?

    I have a vague memory that there were fixes geared toward unintended borders on images from the <cfimage...> tag.  I don't remember enough of the details to know if it applies to your situation or not, but I'm sure the hot fixes pages would give you more details.

    http://kb2.adobe.com/cps/402/kb402604.html