java doesnt provide a standard api for acquiring images from digital cameras, scanners, and other image-acquisition devices. this omission has inspired this three-part java tech series that explores the twain and sane image-acquisition specifications, and how to make use of those specifications in a java context. the previous two articles in this series--the first introducing twain and providing a simple twain library and java application that demonstrates that library, the second on improving on the library and demo application--focused on the twain specification from a microsoft windows perspective, because twains origin lies in the windows world. in contrast, this article largely moves away from twain (and windows), by focusing on the unix-based sane image-acquisition specification.
what is sane? 【程序编程相关:Java源码解读之util.ArrayL】this article begins with an introduction to sane, where you learn about sanes environment, api, and network protocol. the article next explores a java api for acquiring images with sane. moving forward, the article discusses the need for both sane and twain. the article (and series) closes by looking at merging sane with twain into a unified image-acquisition specification. 【推荐阅读:CLR和JRE的运行机制的初步总结】
sane was introduced a few years after twain to support (and standardize) image acquisition on unix and linux platforms, because twain could not (and still is not able to) do the job. although sane originated for unix and linux, it has been ported to mac os x, os/2, and other operating systems. 【扩展信息:用BeanShell实现公式管理】
sane, an acronym for "scanner access now easy," is an image-capture api. the api provides standardized access to any raster-image scanner, camera, or other kinds of image-acquisition devices. version 1.03 is the current version.
sane is maintained by volunteers who meet at sanes official website (see the resources section for a link to the website). from that website, you can download sane source code and documentation for your unix or linux platform.
make sure to download "sane standard version 1.03" (see resources for a link). that document introduces sane, describes sanes environment, explores the sane api, and discusses sanes network protocol. the three sections below are based on material found in that document.
sane environmentsane provides a standard interface to raster-image devices. applications using that interface are known as sane front ends. drivers that implement that interface and control raster-image devices are known as sane back ends. figure 1 shows the relationship between sane front ends and back ends.
figure 1. relating front ends to back ends
... 下一页