![]() |
#1 |
Member
![]() Posts: 16
Karma: 14
Join Date: Apr 2012
Device: Sony PRS-T1
|
Scaling Images in epubs
Just thought I'd share this for other PRS-T1 users. I found that a few epubs I downloaded from www.archive.org had images in them that would not scale properly on my PRS-T1 screen. I found an old thread here which discussed the issue but seemed to end without a resolution. The main problem appears to be that Sony readers ignore image sizes specified in points rather than pixels. My solution was two fold using Calibre.
First, do an epub to epub conversion within Calibre, use the "Extra CSS" field in the conversion dialog and paste the following: .img {min-width:300px; max-width:590px; min-height:300px; max-height:790px} This is still not good enough because for some reason Calibre still wants to specify image sizes in points. Therefore, after the conversion is completed, "tweak" the book in Calibre, open the stylesheet.css file and use a text editor to find/replace all instances of "pt" to "px". Rebuild the book and sideload it to the reader, all the images should now scale down properly. |
![]() |
![]() |
![]() |
#2 | |
Booklegger
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,801
Karma: 7999816
Join Date: Jun 2009
Location: Toronto, Ontario, Canada
Device: BeBook(1 & 2010), PEZ, PRS-505, Kobo BT, PRS-T1, Playbook, Kobo Touch
|
Quote:
Better to do a search for img tags and change them by hand. Or at least do your search&replace individually and skip the font size changes. |
|
![]() |
![]() |
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,613
Karma: 6718541
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
|
|
![]() |
![]() |
![]() |
#4 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 553
Karma: 1234566
Join Date: Jul 2010
Location: Vancouver, WA
Device: Sony PRS-T1, & Kobo Mini
|
|
![]() |
![]() |
![]() |
#5 |
Member
![]() Posts: 16
Karma: 14
Join Date: Apr 2012
Device: Sony PRS-T1
|
Hmm. I just converted a ~300 pg book this way and I'm about 1/2 way through with no problems in font size. This particular book had about 50 images in it, that's why I utilized the method described. Maybe you are misunderstanding, I am changing all instances of pt to px in the stylesheet.css file that was generated from specifying Extra CSS in Calibre. There were only images specified in that file under each .calibreXX section.
|
![]() |
![]() |
![]() |
Tags |
epub, image, prs-t1, scale, stylesheet.css |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
images stretching on iPad epubs | SamL | ePub | 1 | 12-22-2011 05:01 AM |
problem scaling images | paola | ePub | 11 | 05-12-2011 02:20 AM |
Problem hyperlinking to images in ePubs | Curious George | ePub | 3 | 11-29-2010 05:19 PM |
Adding epubs to iTunes with cover images | sartori | ePub | 31 | 09-30-2010 12:39 PM |
A bug with images in epubs? | Cyclops | ePub | 2 | 09-13-2010 10:57 AM |