zoukankan      html  css  js  c++  java
  • luagd介绍

    luagd

    官网:

    http://ittner.github.io/lua-gd/

    下载

    http://files.luaforge.net/releases/lua-gd/lua-gd/lua-gd-2.0.33r2forLua5.1

    Lua-GD is a set of Lua bindings to the Thomas Boutell's gd library that allows your code to quickly draw complete images with lines, polygons, arcs, text, multiple colors, cut and paste from other images, flood fills, read in or write out images in the PNG, JPEG or GIF format. It is not a kitchen-sink graphics package, but it does include most frequently requested features, including both truecolor and palette images, resampling (smooth resizing of truecolor images) and so forth. It is particularly useful in Web applications.

    Lua-GD is a programming library, not a paint program. If you are looking for that or are not familiar to the Lua Programming Language, you are in the wrong place.

    The Lua-GD API is not identical to the gd C API: it was changed in a way that make it more familiar to Lua users and use the extra power provided by Lua, at cost of some learning for those that already use gd. Documentation on API are available on the download package and as an online manual.

    =====》

    LUA GD 是一种对gd库的lua语言绑定, gd库允许你快速画线条、多边形、弧形、文字、多种颜色。支持的图片格式为 PNG JPEG GIF。

    LUA GD是一种编程库,不是绘画程序。 如果你想找绘画程序, 或者 不熟悉lua编程语言, 你来错了地方。

    LUA GD接口并不完全等同于GD接口。

    gd库(GD Graphics (Draw) Library)

    https://github.com/libgd/libgd

    GD is an open source code library for the dynamic creation of images by programmers.

    GD is written in C, and "wrappers" are available for Perl, PHP and other languages. GD can read and write many different image formats. GD is commonly used to generate charts, graphics, thumbnails, and most anything else, on the fly.

    The most common applications of GD involve website development, although it can be used with any standalone application!

    =========》

    GD是一个开源的代码库, 程序员可以使用它, 动态创建图片。

    GD使用C实现, 有一层包裹语言, 例如 PHP

    用于创建图表、图片、标志。

    GD往往被网站开发使用, 但是它也可以用在任何独立的应用上。

    应用

    网站登录验证码:

    http://www.cnblogs.com/chutianyao/archive/2010/07/21/1782008.html

    这样总共用不到20行代码就实现了一个简单的验证码,效果如下:

    虽然基本实现了验证码图片的生成,但还不太理想;要实现真正可用的验证码,大概还需要做如下处理:设置不同字体、字符要随机倾斜、要随机模糊字符、要增加干扰等。

  • 相关阅读:
    VS 2013 中如何自定义快捷键(图解)
    c# XML读取
    Java与.NET的WebServices相互调用
    .NET 的 WCF 和 WebService 有什么区别?(转载)
    2017年第六届数学中国数学建模国际赛(小美赛)比赛心得
    网络分析法(Analytic Network Process,ANP)
    图的简单应用(C/C++实现)
    【Android开发学习笔记之一】5大布局方式详解
    Android布局属性详解
    Android应用程序使用两个LinearLayout编排5个Button控件
  • 原文地址:https://www.cnblogs.com/lightsong/p/5353187.html
Copyright © 2011-2022 走看看