Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ibdemo(1) — NEWS-os 4.1C

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ibsdemo(1)

IBDEMO(1)  —  NEWS-OS Programmer’s Manual

NAME

ibdemo − Demo programs for Image Board

SYNOPSIS

/usr/sony/demo/NWB243/ibdemo [ −i [ time ]] [ −w [ time ]] [ −t ] [ −e ]

/usr/sony/demo/NWB243/bin/simpledemo
/usr/sony/demo/NWB243/bin/imagedemo
/usr/sony/demo/NWB243/bin/readerdemo
/usr/sony/demo/NWB243/bin/feederdemo
/usr/sony/demo/NWB243/bin/copydemo

DESCRIPTION

The image board, provided as an optional expansion board, has the following functions: To control the laser beam printer and the image reader, to perform compression / de-compression binary image based on an encoding method that conforms to the T.6 standard recommended by CCITT (G IV), to perform binary image rotation, scaling. 
The image board comes in two models - the NWB-242 (for A4-size) and the NWB-243 (for A3-size).

ibdemo is demonstration program which can perform the operations including image reader setup, image scanning, editing, printing, scaling, data compression/de-compression and file reading/writing.  The program can output the image into the bitmap display under X window system. 

By −t option, ibdemo measures and displays the execution time for some commands. 

If the −w option is specified, ibdemo waits for the next commands with the window open without waiting for the mouse click indicating the end of the image display.  Time specifies the interval until the next input in second. 

The −i option specifies the timeouts interval for waiting for keyboard input in second.  If time is omitted or the −i option is not specified, a default timeout of 60 seconds is used.  When time expired, the timeout message is output, and if the −w option is specified, the window is closed.  No timeout is generated if ’0’ is specified. 

By the −e option, messages will be displayed in English.  ibdemo displays the messages in Japanese under Shift-JIS environment without the −e option. 

OPERATION EXAMPLE

There follows an example of operation when displaying the compressed image data supplied with NEWS-OS. 

Start
% cd /usr/sony/demo/NWB243/bin
% ibdemo After starting X Window System and the xterm terminal emulator, enter as above. The main menu appears and ibdemo awaits menu selection. 

Decompression
Menu no. ? 8
file name :  ../data/data.1 Select "8. Load & Expansion" and enter the sample data file name.

Displaying
Menu no. ? 4 When the number 4 "Shrink & Display" is selected, the expanded image (400dpi) is reduced to 1/4 vertically and horizontally, and is displayed at 100dpi in the new window. Clicking anywhere inside this window with the mouse ends the image display.

Displaying
Menu No. ? 5 When the number 5 "Display zoomed data" is selected, part of the image is enlarged to window size and displayed. The expanded sample image is displayed in the new window. Specify the area (rectangle) you want to zoom. Position the mouse cursor on the upper left corner of the rectangle area and click the mouse button. Repeat the same for the lower right corner of the rectangle area. The image in the specified rectangle is zoomed and displayed. Clicking anywhere inside this window with the mouse ends the image display.

Termination
Menu No. ? 99 When the number 99 "Exit" is selected, ibdemo ends. 

BASIC OPERATION

You enter three types of information to control ibdemo: number; file name; y or n;

At the main menu level and at the submenu level, 0 indicates menu display and 99 indicates exit for the menu. 

To close a window which is displaying an image, move the mouse cursor inside the window and click the mouse button.  (If the −w option is specified, this operation is not required.) 

When selecting a rectangle area on a displayed image, specify two points on the diagonal by clicking the mouse button. A new window opens. 

COMMAND SCRIPTS

The following command scripts are includes. 

simpledemo
This script displays compressed image data supplied with NEWS-OS.  Invoke this command under X Window System. 

imagedemo
This script displays compressed image data supplied with NEWS-OS and performs some image processing such as rotation, mirror-image reversal, rectangle transfer and filter processing.  Invoke this command under X Window System. 

readerdemo
This scripts demonstrates the functions of the image reader NWP-540. First, position an A4-size document on the image reader’s scanning bed so that its upper right corner is aligned with the A4 mark. Then invoke this command under X Window System.
This scripts terminates immediately after initializing if the image reader is NWP-544.

feederdemo
This scripts demonstrates continuous scanning using the document feeder. Place five sheets of any A4-size document in the document feeder. In this demo, the A4-size paper is scanned at 400 dpi, and image data is taken into a demo process without compression. You can assume that the scanning speed demonstrated here is the standard speed of continuous scanning when compression is not performed.

copydemo
This scripts outputs the image scanned from each page in the document feeder to the laser beam printer. Invoke this command with the image reader, document feeder and laser beam printer connected. To terminate the demo, raise the document feeder.

DATA STRUCTURES

This section explains the formats of the files used in the demo program. 

Compressed image
The following 16-byte header is stored at the beginning of the file, and is followed by compressed image data.

struct {
unsigned int length; /∗ length of compressed data(bytes) ∗/
unsigned int width;  /∗ width of expanded image(dots) ∗/
unsigned int height; /∗ height of expanded image(dots) ∗/
unsigned int dpi;    /∗ resolution (dpi) ∗/
} header;

Uncompressed image
The following 8-byte header is stored at the beginning of the file, and is followed by image data. This format is the same as one used in scn command with the −format scn option. 

struct {
unsigned short dpi;        /∗ resolution (dpi) ∗/
unsigned short width;      /∗ width of expanded image(dots) ∗/
unsigned short height;     /∗ height of expanded image(dots) ∗/
unsigned short bpd;        /∗ bits per pixel ∗/
} header;

Image reader settings
This is a 64-byte file. The file begins with a 18-byte header followed by 46 bytes of image reader settings explained in the chapter of "Image board library" in "NEWS-OS Release 4.0 PROGRAMMERS’ GUIDE".

FILES

/usr/sony/demo/NWB243/bin/ibdemodemo program
/usr/sony/demo/NWB243/data/data.?demo data
/usr/sony/demo/NWB243/src/∗source files for demo program
/usr/sony/demo/NWB242symbolic link

SEE ALSO

ibsdemo(1)
" NEWS-OS Release 4.0 PROGRAMMERS’ GUIDE / Image Board Library", " NEWS-OS Release 4.0 USERS’ GUIDE / Image Board Demo Program"

BUGS

By the following command line, whole display may be covered by the window. 
/usr/sony/demo/NWB243/bin/ibdemo −w −i 0
Use the value other than 0 for timeout, or you can not input from keyboard if certain settings of the window manager.

NEWS-OSRelease 4.1C

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026