WordPress.org

Support

Support » Plugins and Hacks » Is there a plugin to create images on the fly?

Is there a plugin to create images on the fly?

  • 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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Domino_ukraine
    Member

    @domino_ukraine

    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 🙂

    Emily
    Member

    @ebloss

    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! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Is there a plugin to create images on the fly?’ is closed to new replies.