Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Other formats > IMP

Notices

Reply
 
Thread Tools Search this Thread
Old 04-16-2008, 12:37 PM   #1
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Thumbs up Converting .IMP to anything? WE ARE NOW THERE!

EDIT: 16 May 2008

Welcome to deimp.exe, the text decompressor (extractor) for .imp files created by Nick Rapallo (me).
See the thread Reverse-engineering the .IMP format for deimp's C source code as deimp_v0.1_source.zip.

Version 0.1 is very basic, but works well given these caveats:
  • Works on only un-encrypted .imp files i.e non DRM'ed files.
  • Assumes that the .imp file was compressed when created. For now, if not, you will get gibberish. To avoid this situation the included .bat file requires you to uncomment a line for this case.
  • Windows only executable assumes Intel LE (Little Endian) byte ordering (LSB to MSB).
  • Only extracts (basic) text files; not underlying html. As such no tables, images, formatting is retained. DOS line endings and tabs are inserted.
  • In the resulting '.txt', table starts are indicated by '|', table cells are indicated by '_', image locations are indicated by '|^|' and <hr> is shown as '____________'.

Usage:

1. Unzip deimp_v0.1.zip into the directory where your .imp files are stored. All sub-directories below are processed recursively, leaving only the '.txt' extracted.

2. Double-click the windows batch file 'extract text from imp files.bat' and wait.

3. That's it. Just edit resulting '.txt' files. Please note that you will have to replace non-common characters like certain quotes, mdashes, etc...

The extracted text (with no images/hyperlinks) can then be easily converted by BookDesigner or equivalent.

Thanks (and a bit of karma) goes to delphidb96 for the link to the LZSS source code (it is the basis of deimp)! And thanks go to Michael Dipperstein (mdipper@alumni.engr.ucsb.edu) for his LZSS source code (lzss-0.6.zip). More information on LZSS encoding may be found at: http://michael.dipperstein.com/lzss

Enjoy!
-Nick

p.s. you do not need the 'unimp.zip' and 'reimp.zip' files; just get the 'deimp_v0.1.zip'!

p.p.s. added 'The Pilgrims Progress in Words of One Syllable.RES.txt', sample conversion of .imp here

p.p.p.s. should you need to extract only one .imp file, you can use the 'extract.bat.txt' attachment (just save as 'extract.bat') and in the MS-DOS command prompt window, type:
1. unimp "Impfilename.imp" and
2. extract "Resdirname" (note no '.RES' and 'Resdirname' may differ from 'Impfilename').


Previously....
This was a response posted in another forum about converting .imp to .prc (or anything useful!)
Quote:
Originally Posted by nrapallo View Post
No, Mobi2IMP doesn't convert from imp to mobi.

Unfortunately, the .IMP format is an 'end' one; meaning there is no known way to extract the original source (.html and images).

However, there are several ways that the ebook 'text' can be extracted to varying degrees of success, as follows:

1. Using the 'ebook viewer.exe' installed on the PC (after installing the free eBook Publisher software here), you would 'Print' using a printer driver that saves to .pdf format, then OCR the resulting .pdf.

2. With some .IMP, it is possible to open them with a text editor (like Wordpad) and 'go to the middle' of the document. There you may find the text used in the .IMP ebook. This depends on which software and compression-setting created that .IMP (does seems to work with recent eBook Publisher creations that are not internally compressed - with LZSS)

Either way, you would loose all formatting, links and all HTML codes in the process. But, would have the text to 'begin' the conversion process.

Most users creating .IMP's ALSO retain the original source for this very reason.

Hope this helps.

Edit: this has all been previously discussed before here
From the IMP Technical Specs:
Quote:
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
By looking at the .IMP specs and exploding the .imp to .res format with unimp.exe, I have noticed that the "text" portion (Data.frk) of the 1150 and 1200 .imp versions are identical (even for very complex files)! The formatting changes are stored in the various files within the .res for each reader and those differ greatly!

Alas, if the "text" is compressed, then it is not visible within the .imp. It must first be 'uncompressed' using a LZSS algorithm so we are not there yet!

Still trying... WE ARE NOW THERE!

p.s. I've added the unimp.exe program as well as a reimp (sbtest.exe) program. Just drag and drop your file onto the .exe name in Windows Explorer (or a shortcut icon you've created on your desktop).
Attached Files
File Type: zip unimp.zip (2.5 KB, 4823 views)
File Type: zip reimp.zip (194.8 KB, 3806 views)
File Type: zip deimp_v0.1.zip (726.1 KB, 6399 views)
File Type: txt The Pilgrims Progress in Words of One Syllable.RES.txt (128.7 KB, 2213 views)
File Type: txt extract.bat.txt (391 Bytes, 2640 views)
File Type: txt deimp-readme.txt (1.7 KB, 2755 views)

Last edited by nrapallo; 01-14-2009 at 12:02 AM. Reason: added sample conversion of .imp to .txt
nrapallo is offline   Reply With Quote
Old 04-17-2008, 08:37 AM   #2
LeserattePD
Enthusiast
LeserattePD doesn't litterLeserattePD doesn't litter
 
Posts: 47
Karma: 136
Join Date: Mar 2008
Location: UK
Device: Ebookwise 1150, Kindle 3
Thanks a lot for taking this problem on!

It is much appreciated, as I am planning to move from my ebookwise to an eink device sometime this year and would hate to go through downloading all my ebooks again. Thankfully my books mostly are from BAEN so I can download them in another format, but I also have a few secure format books from ebookwise and would hate to loose those (especially as they are so expensive to begin with!).
LeserattePD is offline   Reply With Quote
Advert
Old 04-17-2008, 09:43 AM   #3
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by LeserattePD View Post
Thanks a lot for taking this problem on!

It is much appreciated, as I am planning to move from my ebookwise to an eink device sometime this year and would hate to go through downloading all my ebooks again. Thankfully my books mostly are from BAEN so I can download them in another format, but I also have a few secure format books from ebookwise and would hate to loose those (especially as they are so expensive to begin with!).
Sorry, we are not there yet, not even close!

And I am not looking to 'crack' secured .imp ebooks, only non-DRMed .imp would be supported, if I can find a LZSS uncompressor routine.
nrapallo is offline   Reply With Quote
Old 04-17-2008, 12:15 PM   #4
delphidb96
Wizard
delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.
 
Posts: 2,999
Karma: 300001
Join Date: Jan 2007
Location: Citrus Heights, California
Device: TWO Kindle 2s, one each Bookeen Cybook Gen3, Sony PRS-500, Axim X51V
Quote:
Originally Posted by nrapallo View Post
Sorry, we are not there yet, not even close!

And I am not looking to 'crack' secured .imp ebooks, only non-DRMed .imp would be supported, if I can find a LZSS uncompressor routine.
Well, you have no need to worry about 'cracking' any BAEN books because they've always been DRM-free. (That's what I love about BAEN books.) As for an LZSS decompressor routine... I've attached just one of the many source files that I googled to this post. I found it here:

http://michael.dipperstein.com/lzss/#download

Enjoy!

Derek
Attached Files
File Type: zip lzss-0.6.zip (52.6 KB, 2543 views)
delphidb96 is offline   Reply With Quote
Old 04-17-2008, 12:22 PM   #5
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by delphidb96 View Post
Well, you have no need to worry about 'cracking' any BAEN books because they've always been DRM-free. (That's what I love about BAEN books.) As for an LZSS decompressor routine... I've attached just one of the many source files that I googled to this post. I found it here:

http://michael.dipperstein.com/lzss/#download

Enjoy!

Derek
Nice find! All I kept on getting with google was the simple v1.0 lzss.zip (though I didn't try it yet)!

I will tinker with this to see if I can get this algorithm to work.
nrapallo is offline   Reply With Quote
Advert
Old 04-17-2008, 12:51 PM   #6
delphidb96
Wizard
delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.
 
Posts: 2,999
Karma: 300001
Join Date: Jan 2007
Location: Citrus Heights, California
Device: TWO Kindle 2s, one each Bookeen Cybook Gen3, Sony PRS-500, Axim X51V
Quote:
Originally Posted by nrapallo View Post
Nice find! All I kept on getting with google was the simple v1.0 lzss.zip (though I didn't try it yet)!

I will tinker with this to see if I can get this algorithm to work.
Please do as I've got a ton of .imps I want to convert for my Cybook!

Derek
delphidb96 is offline   Reply With Quote
Old 04-18-2008, 09:08 AM   #7
Roberts324
Mad translator
Roberts324 will become famous soon enoughRoberts324 will become famous soon enoughRoberts324 will become famous soon enoughRoberts324 will become famous soon enoughRoberts324 will become famous soon enoughRoberts324 will become famous soon enough
 
Roberts324's Avatar
 
Posts: 99
Karma: 684
Join Date: Jan 2008
Location: Gradignan près Bordeaux, France
Device: eBookwise 1150 reader, Samsung E60 reader, SAMSUNG N150 netbook
Quote:
Originally Posted by nrapallo View Post
Nice find! All I kept on getting with google was the simple v1.0 lzss.zip (though I didn't try it yet)!

I will tinker with this to see if I can get this algorithm to work.
That would be nice, indeed!

And a new dent to your knife's handle...
Roberts324 is offline   Reply With Quote
Old 05-16-2008, 10:13 AM   #8
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Eureka!

More to follow very soon...

See post #1 above for ALL the juicy details!

Last edited by nrapallo; 05-16-2008 at 12:13 PM.
nrapallo is offline   Reply With Quote
Old 05-16-2008, 11:13 AM   #9
GeoffC
Chocolate Grasshopper ...
GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.
 
GeoffC's Avatar
 
Posts: 27,599
Karma: 20821184
Join Date: Mar 2008
Location: Scotland
Device: Muse HD , Cybook Gen3 , Pocketbook 302 (Black) , Nexus 10: wife has PW
Quote:
Originally Posted by nrapallo View Post
More to follow very soon...
Forgive the intrusion , but what's an .imp file ?
GeoffC is offline   Reply With Quote
Old 05-16-2008, 11:19 AM   #10
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
The book format used by the EB1150 bookreader (the subject of this forum section).
HarryT is offline   Reply With Quote
Old 05-16-2008, 11:20 AM   #11
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,827
Karma: 921169
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
nick, you never cease to amaze me. i don't know what we would do without you. karma for you !
zelda_pinwheel is offline   Reply With Quote
Old 05-16-2008, 11:22 AM   #12
GeoffC
Chocolate Grasshopper ...
GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.GeoffC ought to be getting tired of karma fortunes by now.
 
GeoffC's Avatar
 
Posts: 27,599
Karma: 20821184
Join Date: Mar 2008
Location: Scotland
Device: Muse HD , Cybook Gen3 , Pocketbook 302 (Black) , Nexus 10: wife has PW
Quote:
Originally Posted by HarryT View Post
The book format used by the EB1150 bookreader (the subject of this forum section).
Thanks ..
GeoffC is offline   Reply With Quote
Old 05-16-2008, 11:57 AM   #13
delphidb96
Wizard
delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.delphidb96 ought to be getting tired of karma fortunes by now.
 
Posts: 2,999
Karma: 300001
Join Date: Jan 2007
Location: Citrus Heights, California
Device: TWO Kindle 2s, one each Bookeen Cybook Gen3, Sony PRS-500, Axim X51V
Quote:
Originally Posted by nrapallo View Post
This was a response posted in another forum about converting .imp to .prc (or anything useful!)

snipped text removed

Still trying...

p.s. I've added the unimp.exe program as well as a reimp (sbtest.exe) program. Just drag and drop your file onto the .exe name in Windows Explorer (or a shortcut icon you've created on your desktop).
Nick,

How's the program coming? I'd love to know if you've gotten further along. Could you post the updated versions?

Derek
delphidb96 is offline   Reply With Quote
Old 05-16-2008, 12:17 PM   #14
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by zelda_pinwheel View Post
nick, you never cease to amaze me. i don't know what we would do without you. karma for you !
Thanks!

Quote:
Originally Posted by delphidb96 View Post
Nick,

How's the program coming? I'd love to know if you've gotten further along. Could you post the updated versions?

Derek
It's all here now! See post #1 above. Thanks for waiting...

Another fine crafted software... What do you think?
nrapallo is offline   Reply With Quote
Old 05-16-2008, 12:23 PM   #15
DixieGal
Hi There!
DixieGal ought to be getting tired of karma fortunes by now.DixieGal ought to be getting tired of karma fortunes by now.DixieGal ought to be getting tired of karma fortunes by now.DixieGal ought to be getting tired of karma fortunes by now.DixieGal ought to be getting tired of karma fortunes by now.DixieGal ought to be getting tired of karma fortunes by now.DixieGal ought to be getting tired of karma fortunes by now.DixieGal ought to be getting tired of karma fortunes by now.DixieGal ought to be getting tired of karma fortunes by now.DixieGal ought to be getting tired of karma fortunes by now.DixieGal ought to be getting tired of karma fortunes by now.
 
DixieGal's Avatar
 
Posts: 7,473
Karma: 2930523
Join Date: Feb 2008
Location: Ft Lauderdale
Device: iPad
YAY! I'm bookmarking this thread and printing a hard copy, so as to never lose this info! THANK YOU!

Last edited by DixieGal; 05-16-2008 at 12:23 PM. Reason: Jeez, the spinning smilies are making me dizzy....
DixieGal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with converting to IMP format sofbal14 IMP 3 01-19-2010 03:53 PM
Converting RB to IMP format sputnik Fictionwise eBookwise 3 01-04-2010 03:53 PM
Converting .IMP tigriss7 Calibre 2 10-20-2009 12:00 AM
Converting IMP ssimon2000 IMP 2 02-28-2009 08:38 AM
Converting *.imp to rtf/hmtl/doc dreddengineer Workshop 6 07-06-2006 01:07 PM


All times are GMT -4. The time now is 02:05 PM.


MobileRead.com is a privately owned, operated and funded community.