IMP

From MobileRead
Jump to: navigation, search

IMP is an intermediate file format used to store eBook content for several eBook Readers, most notably the eBookwise-1150 and the REB 1200. These devices are end user names for products called the ETI-2 and ETI-1 respectively from http://ebooktechnologies.com/ (no longer available) The Wayback machine displays the last time this site was available Jun 20, 2010. Site downloads are still available from http://www.ebooksystem.net/support_download.htm

Contents

[edit] Notes

Earlier devices similar to these can also use IMP files if they have the latest firmware upgrades.

Google has purchased eBook Technologies.

[edit] IMP Compatible Devices

  • REB 1200, ETI-1, GEB 2150 - 480x640 (Full VGA) 15 bit (32,768) color LCD touch screen devices, GEB and REB may need upgrade firmware from the ETI site. (Color Full VGA devices)
  • eBookwise-1150, ETI-2, GEB 1150 - 320x480 (Half-VGA) 4 bit (16 level) grayscale LCD touch screen devices, GEB may need upgrade firmware from the ETI site. (Grayscale Half-VGA devices)
  • Android devices using the droid imp reader shown at the MobileRead forum.
  • eBook Publisher contains viewers for Windows and Mac PC's.

[edit] IMP Device Support

The IMP file is predefined for a given device and is only intended for devices that have the same screen resolution and color content.

There are two IMP file variants (Color Full VGA & Grayscale Half-VGA), used on the following devices, respectively:

  • The ETI 1 (or REB 1200) is the Color Full VGA device.
  • The ETI 2 (or EBookwise-1150) is the Grayscale Half-VGA device.

Files for either device can be compiled from the same source files using the ETI supplied eBook Publisher software.

IMP files created for the EBookwise-1150 can be loaded and viewed on the REB 1200, but will not expand to the latter's greater screen size. The reverse does not hold true as the right edge and bottom of the page will be chopped off.

A non-device specific format is also available. It has a OEB extension. These files can be converted later to device specific files.

The IMP file is not used directly by the devices mentioned above instead the firmware in the device detects the presence of an IMP file and converts it to a folder structure that is the form (.RES) that is actually used by the device to display the eBook contents. However there are programs for Macs and Windows computers that can read an IMP file directly and are intended primarily to be used to verify file creation or conversion but can be used to read an eBook on these platforms.

A software program like GEB Librarian is required to transfer your own content, in .IMP format, to the eBook reader i.e. eBookwise-1150 or REB 1200. However, another way to transfer IMP files is an indirect method by using a card reader. Take the expanded memory** (SM or CF as appropriate) and place it in a card reader on your computer and move the files to the root of the card. Place the card back in your unit and the first time you turn it on the unit itself will convert the files and then remove the IMP file.

**IMPORTANT NOTICE ESPECIALLY FOR THE eBookwise-1150:
  TURN OFF YOUR EBOOK DEVICE before you remove the memory card from your eBook reader/device.
  Then for the 1150 it's recommended to cycle your reader 'on-off' without the memory card
      i.e. TURN ON YOUR EBOOK DEVICE, then TURN OFF YOUR EBOOK DEVICE.
  After copying to the memory card, ensure YOUR EBOOK DEVICE IS TURNED OFF,
  then insert the memory card into your eBook reader.
  Then TURN ON YOUR EBOOK DEVICE.
      Never insert or remove memory cards when the eBook reading device is turned on.
      Doing so may destroy the memory card and/or your eBook reading device!

[edit] IMP File Format (Technical Specs)

The .IMP file format was initially reverse-engineered by Jeffrey Kraus back in 2002 and his finding for (the REB1200 variant of) the .IMP file format can also be found here.

A .IMP ebook file consists of:

IMP file components comments
header (48 bytes long) starts with .IMP version, followed by signature "BOOKDOUG"
book properties 7 of them, but only 4 directly used/changeable
name of .RES directory may differ from current .IMP filename
table of contents list of all .RES filetype filenames stored
contents of each .RES filetype record header contains count of included files here

The .IMP version (which currently can be 1 or 2) is the first two bytes of the file. The versions differ in their table of contents record sizes. Version 1 .IMPs are rare, if not non-existent!

The .IMP file does not store the (original) source .html; only minimal information is stored in .RES filetype records, on how to display the .html components, on the ebook reader screen, page by page.

[edit] Header (48 bytes)

The Header record in the .IMP file format gives general information about the .IMP ebook file. It comprises the first 48 bytes of the file, as follows:

Hex Offset(Decimal) Bytes Content Comments
0x00 (00) 2 version 1 if created by Softbook Publisher 1.0 (very rare);

2 if created by eBook Publisher v2+ / Softbook Publisher 1.5 (current)

0x02 (02) 8 signature always "BOOKDOUG"
0x0A (10) 8 unknown
0x12 (18) 2 count of included files the number of .RES filetype records included in the subsequent .IMP table of contents
0x14 (20) 2 length of .RES directory name that .RES dirname is stored internally (with no trailing NULL byte) and may differ from the .IMP filename
0x16 (22) 2 remaining bytes for header & book_properties equals the length of Book Properties plus 24!
0x18 (24) 4 unknown
0x1C (28) 4 unknown
0x20 (32) 4 compression off=0, on=1 (LZSS)
0x24 (36) 4 encryption none=0, encrypted=2 (DES)
0x28 (40) 4 imptype & zoom state imptype - 4th byte's upper nibble: Softbook=0, REB1200=1, EBW1150=2;

zoomstate - 4th byte's lower nibble: both=0, small=1, large=2

0x2C (44) 4 unknown

[edit] Book Properties

Book properties are of variable length, start at offset 0x0030 (48) and store the .IMP ebook metadata, as follows:

Bytes (including NULL byte) Content Comments
C string (null terminated) Book ID unique GUID / timestamp of ebook

example: ebook:guid-bfaa38a01e2d494297bbddae0081ef00

i.e. prefix "ebook:guid-" followed by 32-hexadecimal bytes (optional: 4 additional hyphens)

C string (null terminated) Bookshelf Category
C string (null terminated) Subcategory not displayed, but used internally to quickly store the last pagenum for the Small and Large views
C string (null terminated) Title
C string (null terminated) Author Last name not used (obsolete)
C string (null terminated) Author Middle name not used (obsolete)
C string (null terminated) Author First name Author name placed only here usually in the format "first middle last"

[edit] Name of .RES directory

Dirname used when the .IMP is expanded into a .RES folder with its resource files. The Dirname is the ebook name originally used when the .IMP was created by eBook Publisher (normally the .opf filename). The .RES directory name stored here is that Dirname appended with ".RES" (without the quotes). Even though the Dirname is a C string, no null terminating byte is stored since the length of this Dirname was already given in the Header record at offset 0x14.

[edit] Table of contents

Offset to start of table of contents is 48 plus length of book properties (including NULLs) and length of directory name (with no NULL). Files are included in the same order in the table of contents as the contents of the resource files following the table of contents. A file name of four spaces (0x20) becomes "DATA.FRK" when the .IMP file is expanded into a .RES directory. The 12 bytes following "BOOKDOUG" are removed from the header and the book properties are appended and become the "RSRC.INF" file.

[edit] Resource (.RES) filetypes

A .IMP is explanded into the files of a .RES directory after loaded onto the hardware reader. These files are a number of files with names of four (4) uppercase (random/unimportant) letters excepte special files named RSRC.INF and DATA.FRK.

Many of the .RES filetypes follow a common pattern of having a 32 byte header, a variable length data section, followed by an index (or perhaps mutliple indices). A 4 byte pointer at offset 0x0A of the header points to the start of the index. The index entries point to the data in the variable length section in reverse order. Each index entry has an offset to the beginning of its data and the length of that data.

Hex Offset(Decimal) Bytes Content Comments
start of header (32 bytes)
0x00 (0) 2 file version currently version 0x0001
0x02 (2) 4 file type
0x06 (6) 4 null
0x0A (10) 4 offset to start of index
0x0E (14) 18 null
start of variable length data
0x20 (32) offset to start of index - 32
start of index (indices) length 12 for REB1200 length 14 for EBW1150
0x00 (0) 2 resource ID start of index
0x02 (2) 4 length of resource
0x06 (6) 4 offset to start of resource
0x0A (10) 2 length of resource name typically 0x0000
0x0C (12) 2 only present in EBW1150 typically 0x0000
only included with .RES filetype !!sw
0x0C (12) variable start of optional resource name

[edit] DATA.FRK File

One of the component records in the .RES directory when the .IMP file is exploded with unimp.exe is the Data.frk file. It contains the basic text used in the ebook and is the same for both the Color VGA (REB 1200) & Grayscale Half-VGA (EBW 1150) .IMP files. This Data.frk file is decompressed by deimp.exe if it was originally (LZSS) compressed, when created, along with control characters (see below) being substituted/expanded.

DATA.FRK File

Element text is extracted and placed in this file. Elements tags are replaced with control
characters. This file can be compressed and encrypted with compression occuring before 
encryption. This file is compressed when the element <meta name="x-SBP-compress" 
content="on"/> is included in the <x-metadata> element of the package file. The compression 
algorithm used is LZSS. This file is encrypted when the element <meta name="x-SBP-encrypt" 
content="on"/> is included in the <x-metadata> element of the package file. The encryption 
algorithm used is DES. The 8 byte encryption key is in the SoftBook Edition Encryption Key 
File (.key) at offset 0x0C. 
Characters less than 0x20 are removed expect for line break which is replaced with 0x20. 
Mutliple 0x20 characters are replaced with a single 0x20. 
Control characters 
0x0A end of document, forced page break 
0x0B start of element except < span >
0x0D line break element < br / >
0x0E start of table element < table > 
0x0F image element < img / > 
0x13 end of table cell < /td > tag 
0x14 horizontal rule element < hr / > 
0x15 before and after page header content 
0x16 before and after page footer content

[edit] IMP Software Support

For a comprehensive list of all known software/utilities that support the .imp format, see IMP software.

[edit] For more information

  • Open eBook describes the source files used to create an IMP file.
Personal tools
Namespaces

Variants
Actions
Navigation
MobileRead Networks
Toolbox