WordPress.org

Ready to get started?Download WordPress

Forums

Is there a plugin to create images on the fly? (3 posts)

  1. bluegum
    Member
    Posted 3 years ago #

    I am wanting to create page title images within the h3 tag, so is there a way to create the images on the fly, without creating them in Photoshop? I am going to use a font face which most users will not have on their computer, as I downloaded it from the Internet, so it would be better to have a plugin for the images. If someone does know of a plugin to do this, please post the name or link here. Thanks in advance.

  2. Domino_ukraine
    Member
    Posted 3 years ago #

    I can help only with generate image:

    <?php
    $font = "/VIVALDII.TTF"; // path to font ttf-files (FULL!!!!)
    $fontsize = '64'; // font-size
    $fontcolor = "#ff0000"; // font-color
    $text = "WordPress"; // Text
    
    $cmd = "convert -background none -font \"".$font."\" -pointsize ".$fontsize." -fill \"".$fontcolor."\" label:\"".$text."\" -trim png:-";
    
    header("Content-type: image/png");
    system($cmd);
    ?>

    If you wonna make <h3> with image, then must be somethink:

    <h3>
    <?php
    $font = "/VIVALDII.TTF";
    $fontsize = '64';
    $fontcolor = "#ff0000";
    $text = YOUR TITLE FUNCTION;
    
    $cmd = "convert -background none -font \"".$font."\" -pointsize ".$fontsize." -fill \"".$fontcolor."\" label:\"".$text."\" -trim png:-";
    
    header("Content-type: image/png");
    system($cmd);
    ?>
    </h3>

    Well, something like that. dare :-)

  3. ebloss
    Member
    Posted 2 years ago #

    I found a plugin to do such a thing... it goes in the template, to replace the title tag with an image. It works with WordPress 3.2.1...

    http://www.templature.com/2007/10/18/ttftitles-wordpress-plugin/

    Hope this helps! :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.