04-13-2018, 04:48 AM | #1 |
Guru
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Control image conversion
I'm making an ePub with a largish map.
Using Sigil to edit and then create AZW3 with the Kindlegen plugin to read on a PW3. Original format was JPEG, which was about 500 KB. I loaded it in Photoshop and sharpened and cleaned it it a bit and saved to a GIF file. Reduced the colour depth to 8 colours, which was all that was necessary, getting a 200 kB GIF that looks better than the original JPEG. (Would have used PNG, but I know Kindlegen doesn't support that.) Normally I thought Kindlegen will just pass through GIFs unaltered, but it converted my map into a 120 kB JPEG (looking at the AZW using Calibre to see the resources in it). Also this JPEG was resized from the original 1456x2004 to 934x1285 px. Why the **** is it doing this? Is the image too big, in kB or pixels? With 300 dpi Kindles like the PW3 having 1440x1080 screen, maybe the idea is that larger images are just redundant. But if I zoom and pan I can use much larger images at full resolution--if they let me. If you use a Kindle app on a tablet, etc, you can view much larger high res images. Surely, for instance, art books, graphic novels would demand high quality images. How do they get them through? Last edited by AlanHK; 04-13-2018 at 07:29 AM. |
04-13-2018, 09:44 AM | #2 |
Grand Sorcerer
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
What version of kindlegen are you using?
What options does the plugin apply when it runs kindlegen? Can you post the conversion log? I did a test using kindlegen(Windows) V2.9 build 1029-0897292 with an EPUB containing a 3MB 1800x2681 GIF image. The resulting MOBI has it converted to a 3MB JPEG, still at 1800x2861 resolution. |
Advert | |
|
04-13-2018, 10:30 AM | #3 | |
Guru
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Quote:
OPTIONS: X Don't add source files Compression:v2 X Verbose output _ Western _ Convert JPEG to GIF X Add fake ASIN X Generate AZW3 _ Generate Mobi7 X Generate Thumbnail 450 px LOG: Only mention of the file is: Info(prcgen):I1013: Converting and merging image file "\OEBPS\Images\map-8.gif" same as for all the other image files. Spoiler:
Attached the GIF. I inserted it on its own page using "InsertImageSVG" plugin, but I also tried just: Code:
<body> <div> <img alt="map-8" src="../Images/map-8.gif"/> </div> </body> Last edited by AlanHK; 04-13-2018 at 10:33 AM. |
|
04-13-2018, 05:35 PM | #4 |
Grand Sorcerer
Posts: 6,496
Karma: 84420419
Join Date: Nov 2011
Location: Tampa Bay, Florida
Device: Kindles
|
I tried with your image and it works as expected for me.
Did you look for the image in the HDImages folder? |
04-13-2018, 10:57 PM | #5 | ||
Guru
Posts: 668
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
Quote:
And you're right: in the unpacked files the map is named as a jpeg, but is actually a gif 6 bytes larger than the source. (Using IrfanView to get the specs.) Quote:
So, sorry about that. I had the habit of using Calibre's ebook viewer to check out conversions, but it seems my assumption that it just unpacked and then viewed the file was wrong. The reason I was checking this out is that the AZW was rather smaller than the epub, when it's usually the other way. So I looked at the other unpacked AZW images, and found that while the gif was the same, for some jpegs compression had been changed. e.g. In the ePub -- 87 kB, quality 98 in the AZW -- 42 kB, quality 80. The cover image though was the same spec, same size, quality still 98. So, unless I've made another dumb assumption, it looks like Kindlegen does leave GIFs as-is, and (always?) cover images, but other jpegs may recompress. And I found earlier that PNGs are converted to either GIFs or JPEGs, which is why I started to use GIFs rather than PNG for most diagrams and maps to keep them sharp. Last edited by AlanHK; 04-13-2018 at 11:10 PM. |
||
Advert | |
|
04-19-2018, 10:03 AM | #6 | |
Wizard
Posts: 1,496
Karma: 11250344
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Forma, Kindle Oasis 2, Sony PRS-T2
|
Quote:
Whereas the ePub retains the image quality, and backgrounds remain pure white even with max brightness set on either my iPad Pro or Pixel C tablets. And images remain sharp and crisp! If anyone knows a way to prevent the rather profound loss of image quality when converting to Kindle dual mobi format, I would love to know about it! The difference is pretty sad really, and can easily be noticed between my Kobo Aura ONE and Kindle Voyage as well as on the tablets. Sent from my Pixel C using Tapatalk |
|
04-19-2018, 05:09 PM | #7 |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Hmmmm, could it be the PNGs are lower than 8-bit?
I remember years ago, GrannyGrump's post about 4-bit PNGs being buggy in ADE: https://www.mobileread.com/forums/sh....php?p=2633151 and I know I ran across some oddities with Kindlegen with my Formulas to PNG (mostly with transparent backgrounds): https://www.mobileread.com/forums/sh...d.php?t=223254 I detailed my method of saving as 17 colors, so it forced any sort of PNG compression/optimizers to treat it as 8-bit PNGs. And from what I remember... MAAAANY YEARS ago, Kindlegen didn't support PNGs. Many years back, Kindlegen added PNG support, and sometimes did Color->JPG + Grayscale/Indexed->GIF... and when I last tested a few years back, my PNGs were not converted to JPG or GIF by Kindlegen. Thought 1: Hmmmm could it also be a regression in Kindlegen recently? I must admit, I haven't done a lot of conversions with images lately (~the past year and a half). Thought 2: I haven't poked around in these images specifically... do you have an Alpha channel or a strange Indexed PNG with transparency in it? Thought 3: Taking another stab in the dark here... but could it also be PNGs over a certain filesize get compressed by Kindlegen? See if there's a limit of something like 256 KB where the PNG won't get converted. Last edited by Tex2002ans; 04-19-2018 at 05:23 PM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Image Size Control In Reader odt >> ePub | Foothills | Conversion | 5 | 08-24-2012 09:58 AM |
How to control picture resize during conversion? | DrChiper | Calibre | 5 | 12-22-2011 01:08 PM |
How to control the font size during conversion? | Japes | Conversion | 9 | 07-11-2011 03:16 PM |
Control image quality | Peter_BE | Calibre | 1 | 12-15-2010 08:50 AM |
Help please! on image control | paulgodard | Workshop | 14 | 12-25-2009 06:13 PM |