GD 的 Lua 版本 lua-gd

码农软件 · 软件分类 · 图形/图像处理 · 2019-09-06 10:42:08

软件介绍

lua-gd 是 LibGD 的 Lua 语言绑定版本。

示例代码:

require "gd"

local gray1 = im:colorResolve(128, 128, 128)        -- Using the colon notation
local gray2 = gd.colorResolve(im, 128, 128, 128)    -- Using a C-style notation

下载和安装:

gcc -o gd.so `gdlib-config --features |sed -e "s/GD_/-DGD_/g"`
`gdlib-config --cflags` `pkg-config lua5.1 --cflags` -O3 -Wall -shared
`gdlib-config --ldflags` `gdlib-config --libs` `pkg-config lua5.1 --libs`
-lgd luagd.c
lua test_features.lua
Lua-GD version: lua-gd 2.0.33r2
Lua-GD features:
    PNG support ..................... Enabled
    GIF support ..................... Enabled
    JPEG support .................... Enabled
    XPM/XBM support ................. Enabled
    FreeType support ................ Enabled
    Fontconfig support .............. Enabled

本文地址:https://www.codercto.com/soft/d/13991.html

Algorithms to Live By

Algorithms to Live By

Brian Christian、Tom Griffiths / Henry Holt and Co. / 2016-4-19 / USD 30.00

A fascinating exploration of how insights from computer algorithms can be applied to our everyday lives, helping to solve common decision-making problems and illuminate the workings of the human mind ......一起来看看 《Algorithms to Live By》 这本书的介绍吧!

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试