atitit.验证码识别step2------剪贴板ClipBoard copy image图像 attilax总结

atitit.验证码识别step2------剪贴板ClipBoard copy image图像 attilax总结

剪贴板(ClipBoard)是内存中的一块区域,是Windows内置的一个非常有用的工具,通过小小的剪贴板,架起了一座彩桥,使得在各种应用程序之间,传递和共享信息成为可

系统剪切板一般支持String文本类型和Image图像类型:支持自定义剪切板数据类型

常见的剪切板数据类型

作者:: 老哇的爪子 Attilax 艾龙,  EMAIL:[email protected]

转载请注明来源: http://blog.csdn.net/attilax

/**

* The <code>DataFlavor</code> representing a Java Unicode String class,

* where:

* <pre>

*     representationClass = java.lang.String

*     mimeType           = "application/x-java-serialized-object"

* </pre>

*/

public static final DataFlavor stringFlavor = createConstant(java.lang.String.class, "Unicode String");

/**

* The <code>DataFlavor</code> representing a Java Image class,

* where:

* <pre>

*     representationClass = java.awt.Image

*     mimeType            = "image/x-java-image"

* </pre>

*/

public static final DataFlavor imageFlavor = createConstant("image/x-java-image; class=java.awt.Image", "Image");

/**

* The <code>DataFlavor</code> representing plain text with Unicode

* encoding, where:

* <pre>

*     representationClass = InputStream

*     mimeType            = "text/plain; charset=unicode"

* </pre>

* This <code>DataFlavor</code> has been <b>deprecated</b> because

* (1) Its representation is an InputStream, an 8-bit based representation,

* while Unicode is a 16-bit character set; and (2) The charset "unicode"

* is not well-defined. "unicode" implies a particular platform‘s

* implementation of Unicode, not a cross-platform implementation.

*

* @deprecated as of 1.3. Use <code>DataFlavor.getReaderForText(Transferable)</code>

*             instead of <code>Transferable.getTransferData(DataFlavor.plainTextFlavor)</code>.

*/

@Deprecated

public static final DataFlavor plainTextFlavor = createConstant("text/plain; charset=unicode; class=java.io.InputStream", "Plain Text");

/**

* A MIME Content-Type of application/x-java-serialized-object represents

* a graph of Java object(s) that have been made persistent.

*

* The representation class associated with this <code>DataFlavor</code>

* identifies the Java type of an object returned as a reference

* from an invocation <code>java.awt.datatransfer.getTransferData</code>.

*/

public static final String javaSerializedObjectMimeType = "application/x-java-serialized-object";

/**

* To transfer a list of files to/from Java (and the underlying

* platform) a <code>DataFlavor</code> of this type/subtype and

* representation class of <code>java.util.List</code> is used.

* Each element of the list is required/guaranteed to be of type

* <code>java.io.File</code>.

*/

public static final DataFlavor javaFileListFlavor = createConstant("application/x-java-file-list;class=java.util.List", null);

/**

* To transfer a reference to an arbitrary Java object reference that

* has no associated MIME Content-type, across a <code>Transferable</code>

* interface WITHIN THE SAME JVM, a <code>DataFlavor</code>

* with this type/subtype is used, with a <code>representationClass</code>

* equal to the type of the class/interface being passed across the

* <code>Transferable</code>.

* <p>

* The object reference returned from

* <code>Transferable.getTransferData</code> for a <code>DataFlavor</code>

* with this MIME Content-Type is required to be

* an instance of the representation Class of the <code>DataFlavor</code>.

*/

public static final String javaJVMLocalObjectMimeType = "application/x-java-jvm-local-objectref";

/**

* In order to pass a live link to a Remote object via a Drag and Drop

* <code>ACTION_LINK</code> operation a Mime Content Type of

* application/x-java-remote-object should be used,

* where the representation class of the <code>DataFlavor</code>

* represents the type of the <code>Remote</code> interface to be

* transferred.

*/

public static final String javaRemoteObjectMimeType = "application/x-java-remote-object";

/**

prj.atibrow

//获取粘贴板图片

Image image = null;

try {

image = ClipboardUtil.getImageFromClipboard();

} catch (Exception e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

/**

* 从剪切板获得图片。

*/

public static Image getImageFromClipboard() throws Exception {

Clipboard sysc = Toolkit.getDefaultToolkit().getSystemClipboard();

Transferable cc = sysc.getContents(null);

if (cc == null)

return null;

else if (cc.isDataFlavorSupported(DataFlavor.imageFlavor))

return (Image) cc.getTransferData(DataFlavor.imageFlavor);

return null;

}

java操作系统剪切板Clipboard及自定义剪切板 - - ITeye技术网站.htm

关于java.awt.datatransfer.Clipboard的复制图片等等_小组_ThinkSAAS.htm

java读取粘贴板内容——将图片转成png或者jpg格式 - - 博客频道 - CSDN.NET.htm

时间: 2024-08-01 14:29:04

atitit.验证码识别step2------剪贴板ClipBoard copy image图像 attilax总结的相关文章

atitit.验证码识别step4--------图形二值化 灰度化

atitit.验证码识别step4--------图形二值化 灰度化 1. 常见二值化的方法原理总结 1 1.1. 方法一:该方法非常简单,对RGB彩色图像灰度化以后,扫描图像的每个像素值,值小于127的将像素值设为0(黑色),值大于等于127的像素值设为255(白色). 1 1.2. 方法二:最常见的二值处理方法是计算像素的平均值K, 2 1.3. 方法三:使用直方图方法来寻找二值化阈值, 2 1.4. 方法四:使用近似一维Means方法寻找二值化阈值,(推荐) 3 2. 使用类库imagei

atitit.验证码识别step3----去除边框---- 图像处理类库 attilax总结java版本

atitit.验证码识别step3----去除边框---- 图像处理类库 attilax总结java版本 1. 去除边框思路原理 1 2. Thumbnailator 是一个用来生成图像缩略图.裁切.旋转.添加水印等操作 2 3. OpenCL的Java库 JavaCL 2 4. Java Image Filters是一款基于Java的图像处理类库,特别是在图像滤镜特效方面, 2 4.1.1. 色彩调整 2 4.1.2. 变形和扭曲 5 5. JJIL 是一个Java 的图像处理类库,有超过60

集美大学教务处验证码识别(二)

[原创,转载请标明作者:森狗] 本文对第二种验证码,即管理员登入后台地址的验证码进行识别. 1.采集一些验证码,0~9都要有 2.观察验证码,用画图工具即可. 观察可发现,噪点即阴影,此处的阴影就是颜色比主体验证码略淡,以此为突破口. 3.去除噪点 color.getGreen() 获取绿色的值int,绿色值(0~255 从深到浅),大于200的就是浅色的噪点 public static int isWhite(int colorInt) { Color color = new Color(co

linux与windows共享剪贴板(clipboard)

linux与windows共享剪贴板(clipboard)的方法 先说两句废话,其实linux和windows之间不需要共享剪贴板,直接在putty中,按住SHIFT+鼠标选择就可以了. 但是作为一种hack行为或者不用鼠标实现复制功能,就需要这种方法了. 组合: putty+tmux+vim+mobaiterm/xserver 如果熟悉的朋友应该早已经用习惯了前面三个软件,号称三剑客. 后面的两个软件只是使用其中的一部分功能,即x window的剪贴板. xserver是指windows这边的

(转)java验证码识别

java验证码识别--1 http://blog.csdn.net/problc/article/details/5794460 java验证码识别--2 http://blog.csdn.net/problc/article/details/5797507 java验证码识别--3 http://blog.csdn.net/problc/article/details/5800093 java验证码识别--4 http://blog.csdn.net/problc/article/detail

利用jTessBoxEditor工具进行Tesseract3.02.02样本训练,提高验证码识别率,tesseract训练样本

http://www.bkjia.com/Pythonjc/1131343.html 利用jTessBoxEditor工具进行Tesseract3.02.02样本训练,提高验证码识别率,tesseract训练样本 1.背景 前文已经简要介绍tesseract ocr引擎的安装及基本使用,其中提到使用-l eng参数来限定语言库,可以提高识别准确率及识别效率. 本文将针对某个网站的验证码进行样本训练,形成自己的语言库,来提高验证码识别率. 2.准备工具 tesseract样本训练有一个官方流程说明

Python验证码识别处理实例(转载)

版权声明:本文为博主林炳文Evankaka原创文章,转载请注明出处http://blog.csdn.net/evankaka 一.准备工作与代码实例 1.PIL.pytesser.tesseract (1)安装PIL:下载地址:http://www.pythonware.com/products/pil/(CSDN下载) 下载后是一个exe,直接双击安装,它会自动安装到C:\Python27\Lib\site-packages中去, 个人补充:上面是32位,个人查到64位地址 http://ww

Python验证码识别处理实例(转)

一.准备工作与代码实例 1.PIL.pytesser.tesseract (1)安装PIL:下载地址:http://www.pythonware.com/products/pil/(CSDN下载) 下载后是一个exe,直接双击安装,它会自动安装到C:\Python27\Lib\site-packages中去, (2)pytesser:下载地址:http://code.google.com/p/pytesser/,(CSDN下载) 下载解压后直接放C:\Python27\Lib\site-pack

验证码识别程序

别人让做一个简单的投票软件(刷投票的) 简单了解了一下,需要攻破一下问题 1.IP 限定的问题 2. 验证码识别的问题 IP限定的问题可以使用代理进行解决 找到一个动态代理的地址: http://www.xici.net.co/ 使用CSQUERY  一个类似jquery 的C#html 解析库 代码如下: string ur = "http://www.xici.net.co/"; CsQuery.CQ cs = CsQuery.CQ.CreateFromUrl(ur); CQ da