Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 12-30-2007, 08:45 PM   #76
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,979
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3 and Fire
Quote:
Originally Posted by tompe View Post
It now seems to work to explode the Mark Twain file and then use html2mobi on the exploded html file.
This did not work with the Windows .exe versions (I did not try the Perl scripts). The html2mobi stage seem to work (e.g. the BMP images look ok), but the images in the final MOBI file are corrupted. They are mostly white. When I re-extract from the MOBI using mobi2html the JPG images are about ~4KB instead of ~55KB for the original BMP files.
wallcraft is offline   Reply With Quote
Old 12-30-2007, 10:02 PM   #77
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,029
Karma: 3973186
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
Quote:
Originally Posted by wallcraft View Post
This did not work with the Windows .exe versions (I did not try the Perl scripts). The html2mobi stage seem to work (e.g. the BMP images look ok), but the images in the final MOBI file are corrupted. They are mostly white. When I re-extract from the MOBI using mobi2html the JPG images are about ~4KB instead of ~55KB for the original BMP files.
Actually, I tested it in Windows and it worked for me i think. Or maybe I forgot to check the BMP images... Does it work with a file without BMP images?

I suspect there is a binmode issue again. This is such an irritating difference between Unix and Windows.

I assume I have to boot to Windows again...
tompe is offline   Reply With Quote
Old 12-30-2007, 10:38 PM   #78
popophobia
Junior Member
popophobia began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Dec 2007
Device: E61
Hmm, I tried the windows program to convert a prc to mobi to change title name but it does not seem to work with Mobipocket reader from mobipocket.com. They claims it's corrupted.

When I try to open it with FBReader however, it seems ok but no "end of line" was carried over.

Also, I'm trying to run mobiperl in Linux, what package do I need and how do I get them? Thanks.
popophobia is offline   Reply With Quote
Old 12-30-2007, 10:48 PM   #79
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,029
Karma: 3973186
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
Quote:
Originally Posted by popophobia View Post
Hmm, I tried the windows program to convert a prc to mobi to change title name but it does not seem to work with Mobipocket reader from mobipocket.com. They claims it's corrupted.
Could you tell me exactly what command you used and on what file? If you can give me the file even better.

Quote:
When I try to open it with FBReader however, it seems ok but no "end of line" was carried over.
What do you mean? mobi2mobi does not touch the html-code so FBReader ought to show the original prc file in the same way.

Quote:
Also, I'm trying to run mobiperl in Linux, what package do I need and how do I get them? Thanks.
Well, there probably is some method in your distribution how to install packages. In debian I usually search for missing files with "apt-file search filename" and the install the indicated package. Perl files ends with .pm.

If you do not find out which packages to install you can always do "perl -MCPAN -e shell" and the try to search for missing packages and install them. In principle if a file says "use Palm:oc" you probably write "install Palm:oc" in CPAN mode.
tompe is offline   Reply With Quote
Old 12-30-2007, 11:50 PM   #80
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,979
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3 and Fire
Quote:
Originally Posted by tompe View Post
Actually, I tested it in Windows and it worked for me i think. Or maybe I forgot to check the BMP images.
Since the original BMP images were all <60KB, there was no need to convert them to JPG at all. In fact, if BMP or GIF images are small enough then leaving them "as is" is the best approach because a JPG always looses information. This is particularly true of line graphics. If an image is too big, then converting to JPG is probably the best approach in general.
wallcraft is offline   Reply With Quote
Old 12-31-2007, 06:47 AM   #81
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,029
Karma: 3973186
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
Quote:
Originally Posted by wallcraft View Post
Since the original BMP images were all <60KB, there was no need to convert them to JPG at all. In fact, if BMP or GIF images are small enough then leaving them "as is" is the best approach because a JPG always looses information. This is particularly true of line graphics. If an image is too big, then converting to JPG is probably the best approach in general.
Yes, you are right. I did the conversation because the code became simpler. I will test this change and do a new release if it works.
tompe is offline   Reply With Quote
Old 12-31-2007, 06:54 AM   #82
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: 63,147
Karma: 41205449
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
Hi Tommy,

Might be worthwhile to see how the latest book I've uploaded, "Hard Times", works with your tools. This one gave 5 warnings about records >64k from Mobigen, but seems to work fine on the Gen3.
HarryT is offline   Reply With Quote
Old 12-31-2007, 09:04 AM   #83
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,029
Karma: 3973186
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
Version 0.0.20

Version 0.0.20 is available which will be the last version this year

http://www.ida.liu.se/~tompe/mobiper...0.0.20-win.rar

http://www.ida.liu.se/~tompe/mobiper...erl-0.0.20.tar

Changes in 0.0.20:
  • <pre>-tags is now replaced with someting that displays better in a MobiPocket reader.
  • Changed max file size for images to 61000 to avoid conversion of a BMP image.
  • Images are now not converted to jpg if they fit the file size and image size requirements.

For some reason I do not understand the BMP reading do not work in Windows so if you have a BMP file greater that 61000 bytes or with a width greater than 480 then it will not work under Windows. It will work in Linux.
tompe is offline   Reply With Quote
Old 12-31-2007, 09:35 AM   #84
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,029
Karma: 3973186
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
Quote:
Originally Posted by HarryT View Post
Might be worthwhile to see how the latest book I've uploaded, "Hard Times", works with your tools. This one gave 5 warnings about records >64k from Mobigen, but seems to work fine on the Gen3.
I tried to download the book to my Palm T5 but it failed. If I regenerated the book using mobi2html and html2mobi it worked because I resize the image data. Strange that mobigen does not do that properly.

I will add resizing image functionality to mobi2mobi (a flag --fiximagesizes).
tompe is offline   Reply With Quote
Old 12-31-2007, 12:19 PM   #85
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: 63,147
Karma: 41205449
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
Quote:
Originally Posted by tompe View Post
I tried to download the book to my Palm T5 but it failed. If I regenerated the book using mobi2html and html2mobi it worked because I resize the image data. Strange that mobigen does not do that properly.
Perhaps Mobi feel that these days the number of people running on Palm architecture is rather small, and that it's OK to allow better quality pictures on devices which do support it. It is, I suspect, the 64k segmented memory architecture of the Palm which is the issue. That restriction doesn't apply to any other platform - Gen3, Windows, Pocket PC, etc; all those devices have "flat" memory.
HarryT is offline   Reply With Quote
Old 12-31-2007, 06:29 PM   #86
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,029
Karma: 3973186
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
Quote:
Originally Posted by HarryT View Post
Perhaps Mobi feel that these days the number of people running on Palm architecture is rather small, and that it's OK to allow better quality pictures on devices which do support it. It is, I suspect, the 64k segmented memory architecture of the Palm which is the issue. That restriction doesn't apply to any other platform - Gen3, Windows, Pocket PC, etc; all those devices have "flat" memory.
Maybe, but then I think they should have defined a new format. And there web page says that images should have a certain size. i think it is just a restriction in mobigen and if you want to have files that are real MobiPocket files you should fix the problem.
tompe is offline   Reply With Quote
Old 01-01-2008, 07:25 AM   #87
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: 63,147
Karma: 41205449
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
Trouble is, there's no easy way to find out which specific pictures are the problem. When you have 40+ pictures in a book it would be a nightmare to reduce the size of each one in turn and see if the warning goes away.

It's NOT the size of the original source image that's the problem - in all my Dickens books which have pictures, the "original" of the picture JPEG is typically 100-130kb in size. In the vast majority of cases MobiGen obviously does something to the pictures to make them work OK, but it a small minority of cases it gives you a "record >64k" warning, and tells you that it won't work on a Palm device as a consequence.
HarryT is offline   Reply With Quote
Old 01-01-2008, 09:17 AM   #88
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,029
Karma: 3973186
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
In the next version of mobi2mobi it will print out warnings for the images. For your Dicken's book it looks like:

Code:
FIRST IMG Record 168
WARNING:  Record 174 - Image data size might be to large: 63708
ERROR:    Record 176 - Image data size definitely to large: 71488
WARNING:  Record 177 - Image data size might be to large: 65324
ERROR:    Record 178 - Image data size definitely to large: 72376
WARNING:  Record 179 - Image data size might be to large: 64440
ERROR:    Record 183 - Image data size definitely to large: 72632
ERROR:    Record 184 - Image data size definitely to large: 68676
WARNING:  Record 188 - Image data size might be to large: 63136
And you can now use mobi2html to unpack your file. You will ge a directory with images and you can just inspect the file size.
tompe is offline   Reply With Quote
Old 01-01-2008, 09:46 AM   #89
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: 63,147
Karma: 41205449
Join Date: Nov 2006
Location: UK
Device: PW2, iPad Retina Mini, iPhone 4, MS Surface Pro, Onyx T68, N7,
That's very useful, thanks. Would it be possible to add an "autofix" option to your "mobi2mobi" tool to fix the problem automatically? That would be an easy solution for people who do want to read on Palm devices. Other Mobi devices don't seem to have the 64k restriction.

Looks like a bug in MobiGen - it's obviously resizing the images but not getting the resize quite right in these particular cases.
HarryT is offline   Reply With Quote
Old 01-01-2008, 10:00 AM   #90
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,029
Karma: 3973186
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Nexus 7, Nexus 5, iPad 2, Kindle PW
Quote:
Originally Posted by HarryT View Post
That's very useful, thanks. Would it be possible to add an "autofix" option to your "mobi2mobi" tool to fix the problem automatically? That would be an easy solution for people who do want to read on Palm devices. Other Mobi devices don't seem to have the 64k restriction.

Looks like a bug in MobiGen - it's obviously resizing the images but not getting the resize quite right in these particular cases.
Yes, I have already done it and it will be in the next version (a flag --fiximagesizes). It will just reduce the quality until it succeeds or run out of lower qualities to test. I do not resize the image.
tompe is offline   Reply With Quote
Reply

Tags
mobi2mobi

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mobi2Mobi Mobi2Mobi v0.13 - GUI for Mobiperl tools Jad Kindle Formats 461 03-26-2014 12:59 PM
Tools for Editing Kindle .mobi Files? GJN Kindle Formats 33 12-26-2013 02:05 PM
Handy Perl Script to convert HTML0 files to smartquotes maggotb0y Sony Reader 0 04-12-2007 11:49 AM
PRS-500 Perl tools to generate Reader content TadW Sony Reader Dev Corner 0 01-08-2007 05:55 AM
gmail copy (gmcp) - Perl script to copy files to/from Gmail Colin Dunstan Lounge 0 09-04-2004 01:24 PM


All times are GMT -4. The time now is 01:32 AM.


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