01-14-2024, 01:28 PM | #1 |
Guru
Posts: 927
Karma: 2143512
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, Marvin 3
|
New format themes
Has anyone got any "new format" themes which don't work with the old "pbres.exe" or "viewer.exe" tools?
I'm curious what's different in the format. |
01-14-2024, 03:39 PM | #2 |
Connoisseur
Posts: 78
Karma: 7126
Join Date: May 2023
Device: PocketBook Era
|
I could never get pbres to completely decompile the Lines.pbt file on my Era. At first it was due to pbres having a file size limitation for the bmps. After I changed that size all images came out black
|
Advert | |
|
01-15-2024, 03:51 AM | #3 |
Guru
Posts: 927
Karma: 2143512
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, Marvin 3
|
Can you share (in case there are other files with the same name) that Lines.pbt on this thread, or via PM? I'd like to take a look at it.
|
01-15-2024, 07:23 PM | #4 |
Connoisseur
Posts: 78
Karma: 7126
Join Date: May 2023
Device: PocketBook Era
|
Here is a zip folder of what I was working on including the Lines.pbt
|
01-16-2024, 03:31 AM | #5 |
Guru
Posts: 927
Karma: 2143512
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, Marvin 3
|
Thanks - I tried using a copy of https://github.com/Enyby compiled on my Mac, though it works for several pbt files, but on yours it seg faults after writing a few black images...
The pbres binary in the SDK doesn't seem to have an option to extract all the resources at once. You can extract one at a time but they're still in their internal "res" format (well, file(1) says "PDP-11 separate I&D executable" but that seems unlikely) and not BMP. The SDK pbres has an "unpack_resource" function which (decompiled) seems to uncompress the data and write that as an unchanged blob to disk; Enyby's code for "pbres -u" does the same (and gives identical output) but Enyby's "pbres -d" code tries to convert it to a BMP. So I wonder if the internal res format has changed? Your file is still a v1 theme BTW. Last edited by chrisridd; 01-16-2024 at 03:42 AM. |
Advert | |
|
01-16-2024, 07:27 AM | #6 |
Guru
Posts: 927
Karma: 2143512
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, Marvin 3
|
A few more thoughts.
First, Enyby's pbres and yuryfdr's xpbres (both are on GitHub) both support adding TTF fonts as resources, however they both assume when dumping resources that every resource is a graphic. That's a bug, though I guess TTF resources are unusual. The SDK's "pbres" will convert BMP files into new-style graphic resources, so it seems like it would be possible to construct a few known BMP images and use the SDK's "pbres -t" and then the SDK's "pbres -u" to reverse engineer the new-style graphic resource format. If you disassemble the SDK's pbres bmp2res() it looks rather complicated |
01-16-2024, 09:08 AM | #7 |
Connoisseur
Posts: 78
Karma: 7126
Join Date: May 2023
Device: PocketBook Era
|
The seg fault is the bmp variable file size. You need to change it to a larger number. I can't remember which line it was. I'll take a look again
Take a look at this thread I made a while back. The icons I believe are still BMP format. This thread was about creating custom icons https://www.mobileread.com/forums/sh...d.php?t=355521 Last edited by jrw174; 01-16-2024 at 09:10 AM. |
01-16-2024, 12:41 PM | #8 |
Guru
Posts: 927
Karma: 2143512
Join Date: Nov 2011
Location: London, UK
Device: Kobo Aura, Kobo Aura ONE, Marvin 3
|
In this case it isn't the file size that's the problem. "pbres -l Line.pbt" starts like this:
Code:
resource size compressed -------------------------------------------- <theme.cfg> 137293 22902 AppStore:4 19036 3245 CardLogo:4 67832 33882 GooglePlay:4 20456 3688 about:4 12328 602 activate_account_on_eink:4 49736 493 activate_account_on_smartphone:4 49736 989 add_to_cloud:4 12328 584 adjustments:4 12328 182 adjustments_inv:4 12328 756 adobe_activation_layout:4 11360 1162 |
Tags |
themes |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Content How many of you are using Kindle Themes? | sydmalicious | Amazon Kindle | 26 | 07-26-2021 07:09 AM |
Themes | thiago.eec | Editor | 6 | 11-26-2018 12:28 AM |
New Leaf Themes! Themes! Themes! | issybird | Book Clubs | 143 | 08-23-2018 07:08 PM |
Themes? | ldrover | Marvin | 5 | 11-09-2013 07:04 AM |
360 Themes etc | MorganM | PocketBook | 14 | 09-29-2011 10:10 PM |