1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
$VAR1 = bless( {
'alias' => 'MagickText',
'type' => 'creator',
'comment' => 'Example Plugin (needs ImageMagick and Netpbm)
This is a hack, which doesn\'t work with all versions of ImageMagick.
It creates a new image containing text, optionally with (transparent)
border. The new image will appear in the clipboard. ',
'params' => {
'$int1' => {
'alias' => 'Border Width (x)',
'val' => '0',
'min' => '0',
'default' => '0',
'max' => 10
},
'$int2' => {
'alias' => 'Border Width (y)',
'val' => '0',
'min' => '0',
'default' => '0',
'max' => 10
},
'$string1' => {
'alias' => 'Text',
'val' => '',
'default' => ''
},
'$font1' => {
'alias' => 'Font',
'val' => '-*-times-*-r-*-*-24-*-*-*-*-*-*-*',
'default' => '-*-times-*-r-*-*-24-*-*-*-*-*-*-*'
}
},
'commandstring' => 'ppmmake rgbi:1./1./1. 400 50 | ppmtoxpm | mogrify -font "$font1" -draw \'text 0,0 "$string1"\' -crop 0x0 -bordercolor white -border $int1x$int2 -transparency white xpm:-'
}, 'Plugin' );
|