08-06-2024, 07:03 AM | #1 |
Enthusiast
Posts: 36
Karma: 10
Join Date: Sep 2023
Device: none
|
png or base64 for speed rendering?
Greets,
There are too many options for image formats. Recently I thought about base64 format to use for my images. My idea is for the ereader to reduce its decoding to the max in order to save battery. The appeal of base64 is two-fold, first it's can be compressed in text format, secondly somehow text seems to take less cpu cycles to process. The images are monochrome, not even in grey scale, so the content is ideal for good compression algorithm/format. Has anyone experimented with base64 images on epubs? Thanks. |
08-06-2024, 07:18 AM | #2 |
Just trying to survive
Posts: 66
Karma: 210
Join Date: Mar 2009
Device: Nexus 7 2013, Galaxy Note 10.1 2014
|
I've used base64 for embedding images in epubs before, and it worked pretty well for me. Since your images are monochrome, you should get decent compression. Just keep in mind that while base64 can save on decoding time, it might increase the overall file size compared to standard image formats. It’s worth experimenting to see if the battery savings balance out with the file size trade-off.
|
08-07-2024, 03:23 AM | #3 |
Guru
Posts: 677
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
|
I optimise for filesize, which should also decode faster.
You can greatly reduce image file size for linework by reducing the number of colours, To 2 colours if it's lines or rectangles, to 4 if there are diagonals or curves, as greys make less jagged lines than 2. Irfanview on Windows is very good to do this, can even do a batch on a folder of images. Also I look at the image size. Sometime it's thousands of pixels, when reducing it to a few hundred shows little degradation on a ebook player. Use PNG for this, or if you are going to use on Kindle, GIF, as PNGs are converted to JPEG or GIF on conversion with lower quality and larger size. Sometimes can reduce the image size from JPEG by 95%, and get a better result. Last edited by AlanHK; 08-07-2024 at 04:27 AM. |
08-07-2024, 03:31 AM | #4 |
The Grand Mouse 高貴的老鼠
Posts: 72,551
Karma: 309960766
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Base64 isn't an image format. It's a data representation format. It seems unlikely that it'll require fewer cpu cycles to process, since whatever it represents needs to be reconstituted into binary before it can be interpreted. That's an extra step.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
txt.png not rendering | ownedbycats | Library Management | 3 | 07-23-2022 05:46 AM |
calibre_bookmarks encoding=json/base64 | leopoldotosi | Editor | 1 | 08-18-2020 08:22 AM |
Sony Reader for PC -- not rendering 16-color png | GrannyGrump | Workshop | 27 | 10-16-2013 04:25 PM |
Quality/speed of scanned PDF/DjVu rendering? | mSSM | PocketBook | 2 | 08-21-2010 01:44 PM |
where to get autorun.xml, icon.png, key.png, lut.bin for PRS-505 | obender | Sony Reader Dev Corner | 2 | 01-25-2009 04:20 PM |