Showing posts with label Technologies. Show all posts
Showing posts with label Technologies. Show all posts

Wednesday, November 21, 2007

TWAIN - For Scan

The Elements of TWAIN

The TWAIN initiative was originally launched in 1992 by leading industry vendors who recognized a need for a standard software protocol and applications programming interface (API) that regulates communication between software applications and imaging devices (the source of the data). TWAIN defines that standard. The three key elements in TWAIN are the application software, the Source Manager software and the Data Source software. The application uses the TWAIN toolkit which is shipped for free.

Note: As of this writing TWAIN is supported on the following operating systems: all versions of Apple Macintosh, Microsoft Windows 3.x / 9x / NT and Windows 2000. TWAIN is not available on Windows CE. TWAIN is available on IBM OS/2, but the binaries for the Source Manager were not built or distributed by the TWAIN Working Group.

The Objectives of the TWAIN Working Group

·          Ensure users of image acquisition software and devices experience success each and every time.

·          Ensure image-handling software and hardware compatibility.

·          Define and distribute the TWAIN specification.

·          Keep the specification current with state of practice software and hardware.

·          Promote the adoption of the specification.

·          Maintain and distribute a developer’s toolkit.

·          Define TWAIN Test Guidelines.

 

 

 

Monday, November 19, 2007

What Is SANE?

What Is SANE?

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.

An application that uses the SANE interface is called a SANE frontend. A driver that implements the SANE interface is called a SANE backend. A meta backend provides some means to manage one or more other backends.
#include <sane/sane.h>

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.

SANE API

The SANE API was written in the C language. Just as TWAIN supplies the twain.h header file for inclusion in TWAIN-based source code, SANE supplies the sane.h header file for inclusion in SANE-based source code.

The sane.h header file largely consists of type and function declarations. The type declarations range from simple types, such as SANE_Bool, SANE_Int, and SANE_String, to complex types, such as SANE_Option_Descriptor. A total of 14 functions compose the API:

  • sane_init(): Initializes SANE and must be called before any other function.
  • sane_get_devices(): Returns a list of available image-acquisition devices.
  • sane_open(): Opens a named image-acquisition device and returns a handle that must be passed to other API functions used to communicate with the device.
  • sane_get_option_descriptor(): Returns an option descriptor for a specific option (a device parameter). Options describe device controls (such as scan resolution) in a user-interface-independent way and control nearly all aspects of device operation. Option number 0 returns the number of available options.
  • sane_control_option(): Sets/gets the value of a specified option, for the device indicated by a device handle. For example, this function would be used to set a brightness control to 50 percent.
  • sane_start(): Initiates image acquisition from a specific device, as indicated by a device handle.
  • sane_get_parameters(): Returns information on scan parameters for the device indicated by a device handle. Scan parameters include pixels per line and bytes per line.
  • sane_set_io_mode(): Enables either blocking or non-blocking I/O for the device indicated by a device handle. This function can be called only after making a call to sane_start().
  • sane_get_select_fd(): Obtains a platform-specific file descriptor from a device handle. This function can only be called after a call has been made to sane_start().
  • sane_read(): Reads image data from an open image-acquisition device, as indicated by a specific device handle. This function can only be called after a call has been made to sane_start().
  • sane_cancel(): Cancels the current operation for the device that is indicated by a device handle.
  • sane_close(): Closes the open image-acquisition device indicated by a specific device handle.
  • sane_exit(): Terminates an application's communication with SANE. The application must call sane_init() before it can communicate once more with SANE.
  • sane_strstatus(): Translates a SANE status code into a printable string. Examples of status codes include SANE_STATUS_DEVICE_BUSY, SANE_STATUS_IO_ERROR, and SANE_STATUS_CANCELLED.

An application calls sane_init() to begin interacting with SANE. The application next typically calls sane_get_devices() to obtain a list of accessible devices. A device will be picked from this list and its name passed to sane_open() to open the device. Once the device is open, its controls can be set up or queried. This occurs in a loop, where each iteration invokes sane_get_option_descriptor() to obtain a control's descriptor, followed by sane_control_option() to query or set up the control.

Device setup is followed by image acquisition. This task begins with a call to sane_start(), and continues with a loop where sane_get_parameters() and then sane_read() are invoked. Image acquisition continues until sane_read() returns end-of-file, or the user chooses to terminate image acquisition (assuming the application allows image acquisition to be cancelled), whereby the application invokes sane_cancel(). Following image acquisition, sane_close() is invoked and the open device is closed. sane_exit() is then called to break the application's connection with the SANE back end.

SANE is an application programming interface (API) that provides standardized access to any raster image scanner hardware. The standardized interface allows to write just one driver for each scanner device instead of one driver for each scanner and application. The reduction in the number of required drivers provides significant savings in development time. More importantly, SANE raises the level at which applications can work. As such, it will enable applications that were previously unheard of in the UNIX world. While SANE is primarily targeted at a UNIX environment, the standard has been carefully designed to make it possible to implement the API on virtually any hardware or operating system.

 

 

What is TWAIN?

What is TWAIN?

Twain is the interface standard for Windows and Macintosh that allows imaging hardware devices (such as scanners and digital cameras) to communicate with image processing software. Prior to TWAIN, image acquisition devices all came with their own proprietary software. If you wanted to work with a scanned image in a different application, you had to save the image to disk first, then open the application of your choice and re-open the image there.

The TWAIN Working Group is a not-for-profit organization which represents the imaging industry. TWAIN’s purpose is to provide and foster a universal public standard which links applications and image acquisition devices. The ongoing mission of this organization is to continue to enhance the standard to accommodate future technologies.

“Acquire” command provides access to any TWAIN hardware devices installed on the system. Although the software appearance and capabilities for each device can vary, the TWAIN Acquire command calls up the hardware interfacing software, and places the acquired image into the image processing software, without the need for the image to first be saved to disk.

Nearly all image processing software today is TWAIN compliant. If your software supports

TWAIN is not an acronym at all:

Now I planned to develop .net and  Java Interface for TWAIN .

 

 

Tuesday, October 23, 2007

Getting Status Code of a Web Request "MKCOL"

try
{

System.Net.HttpWebRequest Request = System.Net.HttpWebRequest)HttpWebRequest.Create(folderURI);
Request.Method = "MKCOL";
System.Net.HttpWebResponse Response = (System.Net.HttpWebResponse)Request.GetResponse();
}
catch (WebException ex)
{
HttpWebResponse response = (HttpWebResponse)ex.Response;
if (response.statusCode == 405)
{
Console.WriteLine("The MKCOL method can only be performed on a deleted or non-existent resource.");
}
}

WebDAV Methods

RFC 2616
OPTIONS
GET
HEAD
POST
PUT
DELETE
TRACE
CONNECT
RFC 2518
PROPFIND
PROPPATCH
MKCOL
COPY
MOVE
LOCK
UNLOCK
RFC 3253
VERSION-CONTROL
REPORT
CHECKOUT
CHECKIN
UNCHECKOUT
MKWORKSPACE
UPDATE
LABEL
MERGE
BASELINE-CONTROL
MKACTIVITY
RFC 3648
ORDERPATCH
RFC 3744
ACL
Following are from Msdn
http://msdn2.microsoft.com/en-us/library/aa142917.aspx
WebDAV Methods
This topic contains the WebDAV methods that are used to interact with the Exchange store.
BCOPY Method
BDELETE Method
BMOVE Method
BPROPFIND Method
BPROPPATCH Method
COPY Method
DELETE Method
LOCK Method
MKCOL Method
MOVE Method
NOTIFY Method
POLL Method
PROPFIND Method
PROPPATCH Method
SEARCH Method
SUBSCRIBE Method
UNLOCK Method
UNSUBSCRIBE Method
X-MS-ENUMATTS Method

Tuesday, October 16, 2007

What is ObjectArx ?

ObjectArx

ObjectARX®, the AutoCAD® Runtime Extension programming environment, includes C++ libraries that are the building blocks you can use to develop AutoCAD applications, extend AutoCAD classes and protocol, and create new commands that operate in the same manner as built-in AutoCAD commands. You can add new classes and export them for use by other programs. You can also extend the ObjectARX protocol by adding functions at runtime to existing AutoCAD classes.
you can download it from http://www.autodesk.com/objectarx