View Single Post
Old 11-22-2019, 05:02 PM   #66
beiti is on a distinguished road
Posts: 18
Karma: 50
Join Date: Oct 2015
Device: several
Originally Posted by slowsmile View Post
The base width is set to 650 px [...]
the plugin always uses image pixel dimensions that are stored in the epub's Images directory -- it does not use the image pixel values that are used within the image tags in the xhtml files.
Thanks a lot for this reply! That made things much clearer for me.
Originally Posted by slowsmile View Post
just because your epub image dimensions were set as <img src="../Images/img00002.JPG" width="143" height="192" alt=""/> in your xhtml file does not necessarily mean that img0002.jpg was stored in the epubs Images directory with those same height and width dimensions.
No, they are not. They are all 1200px on the longer side. It's the concept of high resolution images.

I'm still trying to find a proper workflow for a ebook project with about 200 images. I use TextMaker as word processor, but the epub files out of TextMaker always need some fine tuning in Sigil - and your PlugIn comes in handy, also for setting image sizes.
One of my problems is managing the various picture sizes; some pictures need to be full width, others can be shown much smaller in the epub layout. My original idea was to export all of them using the same pixel width or hight and then regulate the actual "print" size by making them bigger or smaller in TextMaker (which translates to pixel values in the exported html file - TextMaker doesn't change the image files itself and just copies them to the epub folder).
Now that I know your plugin uses the actual pixel dimensions of the image files, I will change my strategy. I will go back to my photo editor and export the images in different pixel sizes, dependig on the size/width I want them to appear in the ebook. After TextMaker has written the raw epub file, I will use Sigil and CustomCleaner to get percentage values instead of pixel values in the html part.

The only thing that bothers me is that I'm not happy with the 640 px base width. I'm still not sure how big my pictures should be at full with, but certainly more than 640 px.
I spent some time now analysing the insides of the CustomCleaner zip file and I think I know how to adapt it to my needs. To be honest, I don't know anything about Python programming, but I found some lines in the file were the values seem to be defined (perc_width = round(width/640 * 100) and the same for a hight maximum). So I tried to chance them, and after a short test it seems to work fine.

Thanks again for your quick help!
beiti is offline   Reply With Quote