Thread: PRS-T1 Scaling Images in epubs
View Single Post
Old 06-06-2012, 02:12 AM   #1
mochaiso
Member
mochaiso began at the beginning.
 
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.
mochaiso is offline   Reply With Quote