Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ######################
- # generate thumbnail #
- ######################
- my $text_uf = $text; # text unformatted
- $text =~ s/\"/\\\"/g; # escape things so its cool with imagemagick
- open (OUT, ">magick/$md5sum");
- print OUT "text 10, 10\n\"" . $text . "\"\n\n";
- close(OUT);
- my $image = $md5sum . ".png";
- `convert -font mona.ttf -fill black -pointsize 13 -draw "\@magick/$md5sum" images/gray.png thumb/$image`;
- `mogrify -trim thumb/$image`;
- `mogrify -resize 200x200'>' thumb/$image`;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement