Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 08-05-2017, 06:44 AM   #1
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
About image display in viewer

Hi

It happens I may have to tune some image display. The easiest and quickest way -for me- is to use an inline style written within the img tag because it has the highest priority and so I do not have to fiddle with the css stylesheet. I just insert:

Code:
style="width:xx%;"
One example can be one image 400px wide that I wish to display with a 100% width.

This is sufficient with, say Koreader or Prince PDF to obtain the required display. However, I remarked that the Calibre viewer requires an additional height information, if not the image can be distorted. I managed to get a good result, adding the height:auto parameter.

Code:
style="width:xx%;height:auto;"
As this height:auto parameter is usually not required for other reading software, would it be possible for the viewer, if it's missing, to use it as a default ?

Last edited by roger64; 08-05-2017 at 06:48 AM.
roger64 is offline   Reply With Quote
Old 08-05-2017, 06:48 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,842
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Why are you adding width:% in the first place? As far as I know all decent viewer programs automatically constrain images to be within the visible area. And making small images artificially larger jsut makes them pixelated. The calibre viewer has an option to control image fitting in the viewer preferences.
kovidgoyal is offline   Reply With Quote
Advert
Old 08-05-2017, 07:03 AM   #3
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,608
Karma: 3000161
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Quote:
Originally Posted by kovidgoyal View Post
Why are you adding width:% in the first place? As far as I know all decent viewer programs automatically constrain images to be within the visible area. And making small images artificially larger jsut makes them pixelated. The calibre viewer has an option to control image fitting in the viewer preferences.
Thank you

Using an inline style is is the ultima ratio because, unhappily, not all decent programs behave decently, particularly when the image values in CSS are not written in a fool proof way.. Some times image display goes over board ...

I will look in the viewer preferences if I can set up this option.
roger64 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Two columns display in the viewer? femto Calibre 4 06-02-2020 04:45 PM
Display of a png image linked to a svg image roger64 Editor 6 03-13-2015 06:21 AM
Troubleshooting how to use the image viewer in KT 5.1.0 pumpkinpbk Amazon Kindle 13 05-15-2012 01:49 AM
[Kindle Touch] No Image viewer and pdf viewer with white margins MaxPowerITA Kindle Developer's Corner 7 04-24-2012 05:27 AM
Image Viewer? DuckFOO Kindle Fire 10 12-16-2011 09:08 AM


All times are GMT -4. The time now is 02:28 AM.


MobileRead.com is a privately owned, operated and funded community.