Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > Bookeen > Gen3 Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 01-24-2008, 05:41 AM   #16
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,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by HarryT View Post
You should not add linked image files to the "file list" in MobiPocket Creator - if you do, they get added to the eBook twice. For a book which consists of a single HTML file with linked images, all that should be referenced in the OPF is the HTML file. The image files should be present in the same folder, but not referenced in the OPF's file list.
When you say file list do you mean in the manifest and in the spine then? This seems like a bug in MobiPocket Creator then. According to the specification of opf files I read all files should be added in the manifest. And if a file is missing from the spine you should automatically append the missing files in the tools that uses the opf file.

When you unpack a file with clit you get the image files in the manifest. If you run MobiPocket Creator on that opf file do you really get two images?
tompe is offline   Reply With Quote
Old 01-24-2008, 06:05 AM   #17
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
Quote:
Originally Posted by tompe View Post
When you say file list do you mean in the manifest and in the spine then?
Yes, exactly.

Quote:
This seems like a bug in MobiPocket Creator then. According to the specification of opf files I read all files should be added in the manifest. And if a file is missing from the spine you should automatically append the missing files in the tools that uses the opf file.

When you unpack a file with clit you get the image files in the manifest. If you run MobiPocket Creator on that opf file do you really get two images?
I don't know what happens with those, but when you create a book manually using MobiPocket Creator, from an HTML file with embedded links to pictures, then if you add the image file to the "Publication Files" page of Mobi Creator, you'll find that the size of the resulting book will increase by DOUBLE the size of the image file.

Eg, suppose you have a book which, without pictures, is 1MB in size, and you add a picture to it (using an <IMG> link) which is 100kb in size. Ignoring picture resizing for the moment, if you just rebuild the book, you'll find that the size of the book increases to 1.1MB, as you'd expect.

If, however, you add the picture to the "Publication Files" page and then re-build the book, you'll find that it's now 1.2MB in size - the picture is being included in the book TWICE - once by the <IMG> link and again by it being in the manifest.

I don't know if this is a bug or not, but it's certainly the way that it works - try it and see!
HarryT is offline   Reply With Quote
Old 01-24-2008, 06:33 AM   #18
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,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by HarryT View Post
.
I don't know if this is a bug or not, but it's certainly the way that it works - try it and see!
It seems to be lazy programming. The document will work as expected but be larger than it have to be. It might even be that for an opf document the correct behaviour is to ignore links to images that are not in the manifest. I will have to check this and make sure that lit2mobi and opf2mobi works in a reasonable way.
tompe is offline   Reply With Quote
Old 01-24-2008, 06:41 AM   #19
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 reason I noticed it myself is that when I first added pictures to some of my Dickens books, the resulting files were enormous, because some of those books have many MB of pictures, and at first I added all the pictures to the "Publication Files" page of Mobi Creator. When I realised that the pictures were being added twice, I removed the pictures from the manifest, and the books still displayed the pictures correctly, and were the size I expected them to be.

The way that is works is actually extremely convenient, because all my books consist of a single HTML file with linked pictures. That means that, provided I use the same name every time for my book file (I call it "book.html") I can simply re-use the same "opf" file every time - all I have to do is load it in Mobi Creator and change the meta-data for the new book!
HarryT is offline   Reply With Quote
Old 01-24-2008, 07:14 AM   #20
Snuffi
Addict
Snuffi will become famous soon enoughSnuffi will become famous soon enoughSnuffi will become famous soon enoughSnuffi will become famous soon enoughSnuffi will become famous soon enoughSnuffi will become famous soon enoughSnuffi will become famous soon enough
 
Snuffi's Avatar
 
Posts: 245
Karma: 718
Join Date: Dec 2007
Location: Vienna
Device: Pocketbook Pro 612, Bookeen Cybook Gen3
Can confirm what Harry states above. What I meant with my statement about adding the pictures manually was meant a little differently, though:

When I import an HTML file (from some directory) with linked pictures (in same directory or subfolder) I experienced the problem that the HTML was copied to the Creator working directory but not the pictures. That way when I built the book I would not see the pictures in Mobipocket Reader but instead get an error message that the picture could not be found (on the Cybook I would not get any errors, obviously, but when trying to display the picture it would either just omit the picture or crash.
After some fiddling I found out that the HTML is parsed correctly and the references to the pictures were embedded correctly only the fact that the pictures were not present in the working directory when building the book prevented them from being there. This can be remedied by just copying the pictures manually into the Creator working directory of the current book (=where the HTML is located) after all the settings and editing in Creator are done and *before* pressing the "Build" button.

Adding the files from within Creator (i.e. via "Add file") will copy the file to the working directory also but - as Harry mentioned - that would give you a double. I experienced this when importing an HTML which had the cover embedded as a picture at the top. After adding the cover image in Creator (via the menu) I had the cover image two times at the beginning of the book. I had to remove the <img src=...> tag from the HTML before importing to get rid of the double.
Snuffi is offline   Reply With Quote
Old 01-24-2008, 07:29 AM   #21
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
Quote:
Originally Posted by Snuffi View Post
When I import an HTML file (from some directory) with linked pictures (in same directory or subfolder) I experienced the problem that the HTML was copied to the Creator working directory but not the pictures.
Yes, that's absolutely right - you have to copy the image files manually. It doesn't matter when you copy them; they just have to be there at the time that you build the book.

Quote:
After adding the cover image in Creator (via the menu) I had the cover image two times at the beginning of the book. I had to remove the <img src=...> tag from the HTML before importing to get rid of the double.
That's right - the cover image should not be linked in the HTML - just add it using the "Cover Image" page of Mobi Creator.

As I say, what I do is to use standard names for as much as I can - I always call the book file "book.html" and the cover image "cover.jpg". That way I can just copy the opf file from a previous book, double click it to open it in Mobi Creator, and edit the metadata. I don't have to create it from scratch every time.
HarryT is offline   Reply With Quote
Old 01-24-2008, 09:05 AM   #22
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,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by HarryT View Post
That's right - the cover image should not be linked in the HTML - just add it using the "Cover Image" page of Mobi Creator.
I think you should link it also otherwise for example FBReader will not show the cover image. On the other hand if you do not link it maybe you stimulate people to fix FBReader so it handles real MobiPocket files with respect to cover image.
tompe is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error on import Amalthia Calibre 8 03-23-2010 03:04 PM
Can't import into Calibre 6.26 Winter57 Calibre 8 12-05-2009 02:05 PM
6.15 Crash during import jquest Calibre 14 10-02-2009 03:17 AM
Crashing on import RichieJarvis Calibre 2 10-01-2009 12:16 AM
Import USA--> EU KoopaOne Sony Reader 37 05-15-2009 06:34 AM


All times are GMT -4. The time now is 06:45 AM.


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