View Single Post
Old 09-25-2013, 12:07 AM   #12
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
I have attached a sample EPUB with four sets of images (times all four formulas), each inside of their own grey boxes:

Click image for larger version

Name:	TransparentTestPreview.png
Views:	995
Size:	32.2 KB
ID:	112084

#1. No Transparency (Removed and saved right from GIMP just like the tutorial) (8bpp Grayscale)
#2. Transparent formula (Inkscape -> GIMP -> Mode -> Grayscale -> Saved) (32bpp Grayscale)
#3. Transparent formula (Inkscape) (32bpp Grayscale)
#4. Transparent formula (fed through ScriptPNG to optimize) (Indexed 256)

Sadly, I don't have any physical Kindles to test on (I would not trust Kindle Previewer one iota when dealing with situations such as this).

Quote:
Originally Posted by Hitch View Post
And of course, in Kindle, all PNG's are converted to GIF images for the mobi files.
There used to be a KindlGen bug where transparent PNGs turned the transparency into a black background. I just looked up the changelog, and I see this was fixed in KindleGen 2.5:

https://kindlegen.s3.amazonaws.com/d...e%20Notes.html

Quote:
- Improved transparent PNG conversion: Transparent PNG images (now converted to JPEG) will use white background. This originally used black background during conversion causing degraded reading experience.
According to the documentation, I always thought that KindleGen:
  • All PNG -> GIF.
  • Transparent PNG -> GIF with white background.

No clue why they would go from Transparent PNG to JPG!!!

I fed my Transparency Test EPUB into Kindle Previewer, and I found a few things to note:
  • 32bpp Grayscale from GIMP turn into big black boxes. (This is the bug?)
  • I unpacked the Kindle file with "KindleUnpack", and I see that it converts
    • #3 and #4 to JPG with white background (GAH).
    • #1 gets converted to GIF.
    • #2 is a GIF, but is just a big black box.

The bug:

I believe these images will speak for themselves:

Click image for larger version

Name:	TransparentKindle.png
Views:	699
Size:	22.3 KB
ID:	112081 Click image for larger version

Name:	TransparentPaperwhite.png
Views:	659
Size:	22.3 KB
ID:	112083 Click image for larger version

Name:	TransparentKindleFireHD.png
Views:	651
Size:	46.8 KB
ID:	112082

On to the causes of the Bug:

This is all just educated guesses.

I used Imagemagick's "identify -verbose" on all 4 versions of Formula #1 (verbose output attached to this post). After comparing the output closely, I can see that the only major difference between Inkscape's version and GIMP's version is between color type:

https://en.wikipedia.org/wiki/Portab...cs#Color_depth

Inkscape's is set to 6 (RGB + Alpha) while GIMPs is set to the proper 4 (Grayscale + Alpha).

Guess: Perhaps KindleGen can't handle PNG Color Type 4 images?

Request:

Can someone with a lot more image experience create Grayscale + Alpha images and feed them into KindleGen/Previewer? Perhaps try to create them from a different program besides GIMP (maybe Photoshop, or the multitude of others).

Edit:

Click image for larger version

Name:	ADETransparency.png
Views:	643
Size:	30.8 KB
ID:	112087

I just tested this on my Nook + ADE, and it seems like ADE likes to break on the ScriptPNG (Indexed + Transparency), but works fine on the others. The causes of this one? No clue, maybe an Indexing + transparency is EXTREMELY rare.

I would say avoid Transparency PNGs for now.
Attached Files
File Type: epub TransparencyTest.epub (201.7 KB, 330 views)
File Type: zip ImageMagickVerboseOutput.zip (15.3 KB, 354 views)

Last edited by Tex2002ans; 09-25-2013 at 01:04 AM.
Tex2002ans is offline   Reply With Quote