View Full Version : Strange image conversion problem ePub to mobi


AlexBell
07-21-2011, 12:37 AM
Good afternoon all

- The background to this posting is that I have made an ePub book, and know that the XHTML and CSS validate to W3C standards and that the ebook itself validates with ePubCheck.
- The ebook contains several images, two of them black text on white background which show without problem in the original ePub version on my Sony reader, with ADE, and with the calibre viewer.
- But after converting the ebook to mobi with calibre the two images do not show in the mobi version when it is viewed on a Kindle, with the Kindle Previewer, or with the calibre viewer. There is nothing to show that an image is there at all.
- When I converted the ebook to mobi with earlier versions of calibre the two images did show on the Kindle, but I had no need to test them on with the Kindle Previewer or the calibre viewer.
- When I generate the mobi version by opening the ePub version with the Kindle Previewer the images do show on the resultant mobi version. There are other problems, but the images show as expected.
- I have attached the two images.

Is there a way to fix this problem?

I'll see if I can get the publisher's permission to upload the complete ebook if that would help.

kovidgoyal
07-21-2011, 01:55 AM
You need to open a bug report and attach the epub file. You can mark the report private if the work is copyrighted.

AlexBell
07-21-2011, 04:27 AM
Thanks, Kovid.

I'll try to get the owner's permission, and if unsuccessful will set up a dummy ebook containing the two images.

dwig
07-21-2011, 06:41 PM
It is curious that one of the images is a 24bit RGB PNG and the other, SPblurg.png, a 32bit PNG.

If you can't wait for a Calibre fix, I would suggest converting both to 24bit RGB JPEGs like these:

AlexBell
07-22-2011, 04:31 AM
It is curious that one of the images is a 24bit RGB PNG and the other, SPblurg.png, a 32bit PNG.

If you can't wait for a Calibre fix, I would suggest converting both to 24bit RGB JPEGs like these:

Thanks for your trouble, though I'm not sure why it should make a difference.

It's taken me some time to convert the ebook, and I have tested earlier versions with earlier versions of calibre and the same graphics without any problem. Anyway, nothing ventured nothing gained, I'll try your graphics and see that fixes the problem.

I may have to wait anyway; I've tried to register the bug but as I've mentioned in another can't get through the Launchpad Captcha barrier.

kovidgoyal
07-22-2011, 10:30 AM
If you are unable to use Launchpad, create a test file and upload it here.

AlexBell
07-23-2011, 04:26 AM
If you are unable to use Launchpad, create a test file and upload it here.

Thanks, Kovid. I'll do that within the next few days.

I had another try at Launchpad last night using MSIE, and had exactly the same result - it refused to accept pairs of words I had selected for simplicity, and which I'm 99.8% sure I entered correctly.

theducks
07-23-2011, 08:30 AM
Thanks, Kovid. I'll do that within the next few days.

I had another try at Launchpad last night using MSIE, and had exactly the same result - it refused to accept pairs of words I had selected for simplicity, and which I'm 99.8% sure I entered correctly.

MSIE
That is probably the problem: Really! (I have heard reports that IE does not play well with LP (That's different. Usually I have to use IE for to use features of someones site. USFTC :eek:) ).


Try Firefox or Safari

DoctorOhh
07-23-2011, 10:19 AM
Try Firefox or Safari

His initial attempt/failure was using Firefox, although reading this thread I must have got that info from a different thread.

AlexBell
07-26-2011, 04:43 AM
If you are unable to use Launchpad, create a test file and upload it here.

Thanks again, Kovid. I've been away for a few days, but please find attached a version of the ePub ebook which I had the image conversion problem.

The only difference between the original file and the attached file is that I have replace the chapter text with dummy text. Everything else is the same.

The signature.image shows when I view the original ePub file but does not show when I view the file converted to mobi.

I've also attached the mobi version.

AlexBell
07-26-2011, 04:44 AM
His initial attempt/failure was using Firefox, although reading this thread I must have got that info from a different thread.

Yes, I carried on something dreadful in the main calibre forum.

Thanks for your suggestions.

kovidgoyal
07-26-2011, 04:20 PM
I'm confused. I opened the MOBI file you attached in both the kindle previewer and the calibre ebook viewer and both those images were visible.

dwig
07-26-2011, 06:20 PM
I'm confused. I opened the MOBI file you attached in both the kindle previewer and the calibre ebook viewer and both those images were visible.

I checked it on a Kindle 3 and saw no problems with the images. Both of the two in question displayed fine, both on their pages and when zoomed
.

bfollowell
07-26-2011, 08:14 PM
I agree with the other posters that tried your files. They seem to work perfectly. The images in question are viewable from the Kindle Previewer and from a Kindle 3. I'm not really sure what the problem is.

- Byron

AlexBell
07-27-2011, 04:52 AM
Thanks for all your reports. I agree that it works on the Kindle; I'm embarrassed that I did not check it after removing the chapter text.

But I still have the original version with the chapter text in place where the signature does not show. I guess I'll have to put back the chapters one by one to see what happens.

Thanks again.

AlexBell
07-27-2011, 06:55 AM
Please bear with me.

Since my last post I did some work on the files, starting with the TFatITest.epub and TFatITest.mobi which I uploaded yesterday and which several people kindly tested and found that the mobi file does show the signature.png image.

All I have done is change the file name, and changed the title in the content.opf file to TFatI so I could keep the previous two files for later testing.

I then uploaded the TFatI.epub file into my calibre library, and converted it to mobi, and then tested the TFatI.mobi file with the calibre viewer and on my Kindle3. The signature.png image is not showing, and there is nothing to show that it was ever there. The image does show in the ebpub file with ADE and the calibre viewer.

Could you please test the TFatI.mobi file? If the signature.png image is showing I'll have to worry whether there is something wrong with my computer, or with my vision.

dwig
07-27-2011, 08:04 AM
Please bear with me....
Could you please test the TFatI.mobi file? If the signature.png image is showing I'll have to worry whether there is something wrong with my computer, or with my vision.

I downloaded both your new EPUB and new MOBI. The MOBI fails to show the sig in both my Kindle Previewer and K3 device though the other image questioned in your original post is fine.

I ran you new EPUB though Calibre 0.8.11 on my machine and the sig displays fine in the resulting MOBI, again in both Previewer and the K3.

MOBI doesn't support PNG so Calibre would have to be doing some conversion on the image data. I suggested using JPEGs instead because PNG is an extremely complex and extensive spec and perhaps your PNGs are a flavor that is somewhat problematic in Calibre's image code. JPEGs have a more limited range of options and less likely to encounter a flaw in conversion.

Whatever is happening, its not a universal bug in the code since conversion on my machine from your new EPUB was fine.

I've attached my EPUB to MOBI conversion

kovidgoyal
07-27-2011, 11:31 AM
Converting your epub also results in the images being present in the MOBI for me. It sounds like you have a problem with some conversion setting. Try doing a conversion with all settings at defaults.

AlexBell
07-28-2011, 12:12 AM
Thanks to you both. I'll try your suggestions

Well, it's fixed, but I really don't know why or how.

The only things I changed were to make a new png image from the jpg provided by dwig, and to remove the setting to ignore margins - and yes, I know I should have done them separately to get a better idea of what was happening.

My best guess is that telling calibre to ignore the wide margins may have affected this the first image in the book - none of the other images which had exactly the same markup were affected.

It may be that as dwig said the original png was the problem. But I am as sure as I can be that same image worked without problem as I developed and tested the conversion.

Anyway it's fixed. Thanks again for all your help.

AlexBell
09-10-2011, 02:42 AM
It's happened again!

Some time ago I was very concerned that an image did not show when converting from ePub to Kindle even though similar images did show. After some discussion it seems that the problem may have been caused by me setting the conversion process to hide fake margins - whatever the reason the image 'came back' and I went on developing the book.

I've recently changed other parts of the ebook, and am using the latest version of calibre, and that same image again does not show in the Kindle file even though though it does show in the original ePub file. Other similar files do show - bigger and smaller, deep color or 255 grays, and different percentages.

The file which does not show is signature.png, which is attached. Also attached are Greenman.png which does show, and SPblurb.png which does show.

All three files have the same markup shown below, except of course that the file names are different, and the widths are different.

<div class="centre">
<img src="images/signature.png" alt="signature"
width="60%" />
</div>

Can anyone explain what I am doing wrong, or what calibre is doing wrong? The image signature.png does show when I generate the Kindle file with the KindlePreviewer.

I have set the calibre setting to default except for the input and output settings, and have used the image dwig provided.

I've removed the signature.png image and replaced it with signature.jpeg from the original source - that is, not from converting the png to jpeg. That doesn't show either.