View Single Post
Old 02-13-2013, 01:24 PM   #3
ImageSize
Junior Member
ImageSize began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Feb 2013
Device: Smartphone - Aldiko
Thank you very much. I've made it.
Quote:
<div><img alt="" src="../Images/NameofImage.png" width="100%" /></div>
This version always stretches the image to 100 %. Thats not what I want.
Also that:
Quote:
img {
width: 100%;
}
But
Quote:
img {
max-width: 100%;
}
should do it. I write should, because Aldiko has a bug, where this doesn't work.

So the workaroud for Aldiko that it shows the images in the right size is to add to each <img> tag
Code:
style="max-width:100%"
Example: <img src="main-7.png" alt="" style="max-width:100%"/>
Now it works even with Aldiko. You can use Notepad++ and the function replace in files.
Code:
<img src=(.*?) style=(.*?)/>
<img src=\1/>
This is the first Regex. With that you remove the
style="width:###pt;height:###pt;" which makes Abby.

After that you use
Code:
<img src=(.*?)/>
<img src=\1 style="max-width:100%"/>
And now all your images are correctly displayed.

Last edited by ImageSize; 02-13-2013 at 01:32 PM.
ImageSize is offline   Reply With Quote