Inserting images into documents. An image source device is made active
with an application used to create text in a document. An application
programming interface (API) module is accessed from within the
application. The API interfaces the application with a TWAIN module used
for acquiring an image with the image source device. The API module is
separate from the TWAIN module and isolates users from directly
interacting with the TWAIN module. The application uses the API module
for negotiating with the image source device to determine a set of image
capture parameters that control the image source device when acquiring
the image. Data representing the image is communicated from the image
source device into the memory of a computer hosting the application used
to create text so that the data representing the image is a portion of a
document stored in the memory.