Here you can follow the blow-by-blow account of my attempt to transform myself into a (regularly) published author.

Like the Anastasia Raven Fan Page!
And sign up to receive the Books Leaving Footprints Newsletter. Comes out occasionally. No spam. No list swapping. Just email me! jhyshark@gmail.com Previous gifts include a short story, a poem, and coupons. Add your name, and don't miss out!

Wednesday, March 28, 2018

Graphics and EPUB - JPG vs. PNG Formats

I've been beating my head against a wall for two days now trying to get the Dubois Files books to pass the EPUB check. This is the format needed for ebooks at Barnes & Noble, Kobo, iBooks and Overdrive. I do this through Smashwords.

Let me say right away that the Smashwords Style Guide is impressive. If you follow its excellent and careful directions, you are likely to have very little trouble getting books through the formatting checks. It can be used by anyone, whether you publish through Smashwords or not.

However... When I got to the part about adding images to the file some of the language seemed to have changed. I've always used jpg images (also jpeg extension- Joint Photographic Experts Group). But the guide said that png formatted (Portable Network Graphics) images seem to work better for EPUB. So I thought I'd go that route. These children's books have a lot of graphics and I wanted to minimize the headaches, right?

There is a difference in the formats. Jpg is "lossy," which means that some of the detail is lost when the file is compressed. Png is "lossless," which means it should withstand being moved across platforms with better resolution at the end point.

For an ebook on an average sized reader, tablet or phone, however, it's kind of a "who cares." These two images are jpg on the left and png on the right. Screens like these only support 96 pixels per inch anyway, so it doesn't matter if you've got an image with 300 ppi- it will get downshifted to 96 for display.

sketch of a boy talking on an old fashioned wall telephone from the book The Hitchhiker sketch of a boy talking on an old fashioned wall telephone from the book The Hitchhiker

Anyway, I was still stuck on the wording that said png is the better choice. I spent all day yesterday and part of the day before trying to figure out errors like this one: The file 'tmp_f0de42d4eb6865730fa0631fca336cc0_9P8O4M_html_5895aa02.png' does not appear to match the media type image/png, as specified in the OPF file. (ERROR)

Yikes! Well, it turns out you can find out which image this is (I certainly didn't name any file like that!) with some maneuvering, but that just got tedious when the images were rejected over and over again. There seemed to be nothing I could do to correct the problem. I tried using two different converters in addition to my own graphics program. Still got the same errors.

Finally, I decided to go back and put the pictures back in as jpgs. Guess what? The whole thing passed on the first try.

So... if you, too, are beating your head against a wall some day over this, try the other format!

You can still pre-order (through March 31) the set of the first three Dubios Files books for $24 (no discount after March 31), they will be signed by the cover artist Linda J. Sandow, as well as by me. Signed sets can be pre-ordered at Books Leaving Footprints

covers for the Children's mysteries the Dubois Files

Formatting and more

2 comments:

kwpapke said...

PNG also allows an Alpha, or transparency channel. This is often used in illustrations to create an irregular shape to the image - instead of a square, it can be any shape. Many publishing tools will then let you wrap the text around that irregular shape.

Sharkbytes (TM) said...

Nice Kurt- thanks for the info. Probably not something one will do for an ebook, though. I actually haven't done much with png files.