All Projects → botaruibo → xvcode

botaruibo / xvcode

Licence: other
web dynamic validation code generator 动态web校验码图片生成

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to xvcode

ios-nd-gif-maker-objc
Resources for Udacity's Gif Maker app in Objective-C.
Stars: ✭ 17 (-60.47%)
Mutual labels:  gif
pixelizer
An efficient image pixelizer written in go
Stars: ✭ 103 (+139.53%)
Mutual labels:  gif
fissure-android
Android application for generating GIFs on the go
Stars: ✭ 21 (-51.16%)
Mutual labels:  gif
sol-verifier
Verify Solidity smart contracts on Etherscan
Stars: ✭ 22 (-48.84%)
Mutual labels:  verification-code
gif-creator
To create a GIF image with user specified duration. [简单实用] 生成自定义延时的GIF图像。
Stars: ✭ 32 (-25.58%)
Mutual labels:  gif
godot-gdgifexporter
Gif exporter for Godot made entirely in GDScript
Stars: ✭ 85 (+97.67%)
Mutual labels:  gif
movtogif-cli
📺 Convert mov/mp4 to high-quality animated gifs
Stars: ✭ 58 (+34.88%)
Mutual labels:  gif
scripts
A collection of random scripts I coded up
Stars: ✭ 17 (-60.47%)
Mutual labels:  gif
gifa11y
Gifa11y is a customizable vanilla javascript plugin that easily adds accessible play/pause buttons to animated GIFs.
Stars: ✭ 23 (-46.51%)
Mutual labels:  gif
PixelShape
Pixel editor that comes in handy when creating pixel art images and animations
Stars: ✭ 29 (-32.56%)
Mutual labels:  gif
crunchygif
EZPZ VIDEO TO GIF CREATOR
Stars: ✭ 33 (-23.26%)
Mutual labels:  gif
favloader
Vanilla JavaScript library for loading animation in favicon (favicon loader)
Stars: ✭ 20 (-53.49%)
Mutual labels:  gif
record-desktop
🎥 Effortless GIFs and screenshots on Linux, built with Electron.
Stars: ✭ 65 (+51.16%)
Mutual labels:  gif
sorting-visualization
🎨 A command-line tool to generate GIF which can display sorting algorithm
Stars: ✭ 37 (-13.95%)
Mutual labels:  gif
webgif
Easily generate animated GIFs from websites
Stars: ✭ 98 (+127.91%)
Mutual labels:  gif
imagemin-gifsicle
Imagemin plugin for Gifsicle
Stars: ✭ 105 (+144.19%)
Mutual labels:  gif
OpticalIllusions
Some Python code to reproduce a nice optical illusion found on the web.
Stars: ✭ 16 (-62.79%)
Mutual labels:  gif
kap-imgur
Kap plugin - Share GIFs on Imgur
Stars: ✭ 20 (-53.49%)
Mutual labels:  gif
abeamer
frame-by-frame Web Animation framework
Stars: ✭ 49 (+13.95%)
Mutual labels:  gif
iOSUtilitiesSource
IOS Utilities Library for Swift
Stars: ✭ 46 (+6.98%)
Mutual labels:  gif

xvcode (x-validation code)

project description:

this project only for web validation code generating. we provide this tool cause there no security enough validation-code-image generator. this tool provide 4 kind of valid-code image generators. as follows:

this project refer the gifencoder

项目作用: 主要用于生成web动态验证码图片。主要应用场景为web 页面上需要用户输入验证码才能进行操作的地方。 开发原因: 目前网络广为流传的代码所生成的验证码图片太简单,并易于破解。所以我们自己开发了一个简单的验证码生成包,增加了背景的干扰性。 features:

  • 提供1中png格式的图片生成器,3种gif格式图片生成器。
  • 随机码由生成器自身生成。
  • 可一定程度自定义背景干扰图形参数

感谢: 该项目用于生成gif图片编码器使用了 gifencoder 项目

图片示例 mapping from generator to image style

PngVCGenerator: image

GifVCGenerator: image

GifVCGenerator2: image

GifVCGenerator3: image

国内如果不能查看github中readme的图片,可参考https://blog.51cto.com/14234228/2492600 更新自己本地的github dns

Getting Started

For Java Developers

Add Dependency(maven)

add dependency to your pom.xml:

<dependency>
	<groupId>com.github.botaruibo</groupId>
	<artifactId>xvcode</artifactId>
	<version>1.0</version>
</dependency>

####### Code Examples

package test

import java.io.FileOutputStream;
import java.io.IOException;
import com.github.botaruibo.xvcode.generator.Generator;
import com.github.botaruibo.xvcode.generator.Gif2VCGenerator;
import com.github.botaruibo.xvcode.generator.Gif3VCGenerator;
import com.github.botaruibo.xvcode.generator.GifVCGenerator;
import com.github.botaruibo.xvcode.generator.PngVCGenerator;

class Test {
//生成验证码图片到本地磁盘 draw image and save to disk
public void main(String args[]) throws IOException {
		String path = ".";//图片存储路径 path for image save 
		Integer height = 40;//image 高度。  image height. count as pixel
		Integer width = 200;//image 宽度。 image width. count as pixel
		Integer count = 5;	// validation code length.
		String validCode = null; //验证码
		Generator generator = new PngVCGenerator(width, height, count);
        generator.write2out(new FileOutputStream(path + "/1.png")).close();
        validCode = generator.text(); //get the validation code as 'String'
        System.out.println(validCode);
        generator = new GifVCGenerator(width, height, count);//   gif
        generator.write2out(new FileOutputStream(path + "/1.gif")).close();
        validCode = generator.text();
        System.out.println(validCode);
        generator = new Gif2VCGenerator(width, height, count);//   gif
        generator.write2out(new FileOutputStream(path + "/2.gif")).close();
        validCode = generator.text();
        System.out.println(validCode);
        generator = new Gif3VCGenerator(width, height, count);//   gif
        generator.write2out(new FileOutputStream(path + "/3.gif")).close();
        validCode = generator.text();
        System.out.println(validCode);
}
}

the generator.write2out() method proved the ability to write the image binary to any OutputStream object. this especially convenience for servlet request

如果要将验证码图片以流的方式穿到前端,可以直接使用*generator.write2out()*方法

Use Under Command(require ${JAVA_HOME} set)

use the xvcode-1.0-SNAPSHOT-cl.jar file to generate valid-code image directly to disk. command like:

可以使用jar包直接生成本地图片。命令:

java -jar xvcode-1.0-SNAPSHOT-cl

usage :

支持参数如下:

usage:
	-p	dir path for the image, default generate in current dir
	-h	image height, between 50 to 500, default 200
	-w	image width, between 30 to 300, default 40
	-cl	validation code length, between 2 to 10, default 5
	

example:

例如:

java -jar xvcode-1.0-SNAPSHOT-cl -p test/ -h 300 -w 60 -cl 7
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].