代码之家  ›  专栏  ›  技术社区  ›  Moon

将文本转换为图像并旋转

  •  2
  • Moon  · 技术社区  · 14 年前

    有没有方法可以将文本转换为图像,然后旋转文本,然后使用脚本/代码在网页中显示所有文本

    3 回复  |  直到 14 年前
        1
  •  1
  •   David Kuridža    14 年前

    是的,你可以,看看GD的 imagettfext 或者是伊玛吉克的 annotateImage .

        2
  •  0
  •   Dominik Seibold    14 年前

    您可以编写一个脚本,将其像普通图像一样嵌入到html页面中:

    <img src="rotatedtext.php?text=blablubb" />
    

    在输出png数据之前,不要忘记将该脚本中http头的内容类型设置为image/png(为此我建议使用png):

    //create the image here and then:
    header("Content-Type: image/png");
    imagepng($image);
    
        3
  •  0
  •   horiatu    13 年前

    你可能想看我的文章:

    网页中的垂直标签

    http://www.codeproject.com/KB/custom-controls/VerticalLabel.aspx