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

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

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

常见的剪切板数据类型

作者:: 老哇的爪子 Attilax 艾龙,  EMAIL:1466519819@qq.com

转载请注明来源: 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

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

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

    atitit.验证码识别step4--------图形二值化 灰度化 1. 常见二值化的方法原理总结 1 1.1. 方法一:该方法非常简单,对RGB彩色图像灰度化以后,扫描图像的每个像素值,值小于12 ...

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

    atitit.验证码识别step3----去除边框---- 图像处理类库 attilax总结java版本 1. 去除边框思路原理 1 2. Thumbnailator 是一个用来生成图像缩略图.裁切. ...

  3. atitit  验证码理论与概览与 验证码规范 解决方案.docx

    atitit  验证码理论与概览与 验证码规范 解决方案.docx 1.1. 验证码的前世今生1 1.2. 第三代:无知识型验证码1 1.3. 短信验证码1 1.4. 语言验证码1 1.5. 图片验证 ...

  4. Java验证码识别解决方案

    建库,去重,切割,识别. package edu.fzu.ir.test; import java.awt.Color; import java.awt.image.BufferedImage; im ...

  5. linux与windows共享剪贴板(clipboard)

    linux与windows共享剪贴板(clipboard)的方法 先说两句废话,其实linux和windows之间不需要共享剪贴板,直接在putty中,按住SHIFT+鼠标选择就可以了. 但是作为一种 ...

  6. ocr智能图文识别 tess4j 图文,验证码识别 分享及所遇到的问题

    自己对tess4j的使用总结 1,tess4j 封装了 tesseract-ocr 的操作 可以用很简洁的几行代码就实现原本tesseract-ocr 复杂的实现逻辑 如果你也想了解tesseract ...

  7. ocr智能图文识别 tess4j 图文,验证码识别

    最近写爬虫采集数据,遇到网站登录需要验证码校验,想了想有两种解决办法 1,利用htmlunit,将验证码输入到swing中,并弹出一个输入框,手动输入验证码,这种实现方式,如果网站需要登录一次可以使用 ...

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

    1.背景 前文已经简要介绍tesseract ocr引擎的安装及基本使用,其中提到使用-l eng参数来限定语言库,可以提高识别准确率及识别效率. 本文将针对某个网站的验证码进行样本训练,形成自己的语 ...

  9. 【Java】验证码识别解决方案

    对于类似以下简单的验证码的识别方案: 1. 2 3 4. 1.建库:切割验证码为单个字符,人工标记,比如:A. 2.识别:给一个验证码:切割为单个字符,在库中查询识别. /*** * author:c ...

随机推荐

  1. JavaScript入门详解

    开始开发工作. 一.Alert Confirm Prompt <html> <head> <script type="text/javascript" ...

  2. 异常:System.BadImageFormatException,未能加载正确的程序集XXX或其某一依赖项

    常:System.BadImageFormatException,未能加载正确的程序集XXX或其某一依赖项 看到这个异常,我估计谁都会头大一阵子,不过还好,由于前面知道要设置为x86,加上以前观察过I ...

  3. ORACLE EBS FORM 二次开发常用小技巧

    1.锁住当前行 Set_Item_Instance_Property('main.import_flag', CURRENT_RECORD, UPDATE_ALLOWED, PROPERTY_OFF) ...

  4. WinCE5.0开发环境的建立

    目前WinCE5.0的开发工具主要有以下几种:Platform Builder5.0.EVC4.0+SP4.Visual Studio2005.其中Platform Builder主要用于定制WinC ...

  5. JavaScript -- 清除缓存

    在客户端有一个HTML文件,用来提交输入信息,问题在于:每次按刷新时,发觉并不是整个页面重新被装载,好似是缓存中. 因为文本框中仍出现上次输入的值,只有在地址栏中按回车整个页面才重新装载,应当怎样避免 ...

  6. NGUI自适应屏幕分辨率

    unity官方承诺的新ui系统一直没有推出来,我们的UI使用的是原生的OnGUI系统,刚好UI需要改版,索性就想迁到NGUI上面来,于是看了一下NGUI源码,发现NGUI可以大大的降低DrawCall ...

  7. 【Linux C 多线程编程】互斥锁与条件变量

    一.互斥锁 互斥量从本质上说就是一把锁, 提供对共享资源的保护访问. 1) 初始化: 在Linux下, 线程的互斥量数据类型是pthread_mutex_t. 在使用前, 要对它进行初始化: 对于静态 ...

  8. g++编译问题:skipping incompatible /usr/lib//libboost_system.so when searching for -lboost_system

    接上. 连接器无法识别libboost_system.so,虽然找到了动态库文件libboost_system.so但不兼容,导致无法完成链接. 这种情况一般都是二进制不兼容(通俗的讲就是,在一台机器 ...

  9. js 倒计时跳转页面

    <script type="text/javascript">var i = 5; var intervalid; intervalid = setInterval(& ...

  10. redis学习笔记——命令执行流程

    基础知识部分 如果需要掌握Redis的整个命令的执行过程,那么必须掌握一些基本的概念!否则根本看不懂,下面我就一些在我看来必备的基础知识进行总结,希望能为后面命令的整个执行过程做铺垫. 事件 Redi ...