hellokittyer
V2EX  ›  问与答

imagick annotateImage 的性能问题?

  •  
  •   hellokittyer · Oct 1, 2015 · 1831 views
    This topic created in 3882 days ago, the information mentioned may be changed or developed.

    打算搞彩色字,譬如
    “赤橙红绿青蓝紫”分别以对应 color 的字拼接在一张图上面

    gd 库主要用的方法为 imagecolorallocate 和 imagettftext
    imagick 的主要方法为 ImagickDraw->setFilLColor 然后 Imagick->annotateImage(ImagickDraw,..., char)

    然后跑测试,循环 1000 次, gd ~ 1s ,imagic~6.3s
    映像中后者不会慢到如此地步吧。是我错了吗?
    环境:
    rmbp 10.10.5
    php5.6.12
    imageMagick 6.9.1-10 Q16 x86_64

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5290 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 07:33 · PVG 15:33 · LAX 00:33 · JFK 03:33
    ♥ Do have faith in what you're doing.