WordPress.org

Ready to get started?Download WordPress

Forums

Osiris Signature Banner
[resolved] Fixing alpha blending and UTF-8 (2 posts)

  1. carbeck
    Member
    Posted 2 years ago #

    I had to add some stuff to the plugin file to make this work with UTF-8 on my server and to make GD accept alpha layers in the PNG file. In the create_image() function, I put:

    imagealphablending($image, true);
    imagesavealpha($image, true);
    $string = mb_encode_numericentity($string, array (0x0, 0xffff, 0, 0xffff), 'UTF-8');

    The mb_encode_numericentity() function converts any text to entities so as to bypass the problems I got by imagettftext() interpreting UTF-8 input as ISO-8859-1.

    Also I changed the whole thing to UTF-8 without BOM (Notepad++ calls this "ANSI as UTF-8") and replaced all the nasty CR newlines with UNIX LF ones and deleted the double line breaks that somehow crept into the file when I opened it.

    Other than that it seems to work now :)

    http://wordpress.org/extend/plugins/osiris-signature-banner/

  2. jiwangmy
    Member
    Posted 2 years ago #

    where make GD accept alpha layers in the PNG file.
    ermm

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic