I'm currently working at 1.2 version, with many improvement, and image management is one of these.
Originally Posted by dsaronin
1) I try to use .png images, but Writer2ePub always converts to jpeg; I thought epub spec also supports .png. Maybe Writer2ePub could support .png?
I have a problem to recognize real image format in .odt documents. If you put a .bmp image with the extension .jpg this image will be treated as .jpeg, crashing W2E or generating an unusable ePub. So I choose in the first version to convert all images in jpeg.
In the new version I will add a checkbox, "retain original images", so the images will be copied as are, without changes. Obviously, in this case is user responsibility to ensure tu use the right image format…
2) Writer2ePub *always* scales the jpg image down by 72%. It is distorting image quality.
Same as above: the image conversion process in OOo/LibO is a little bit buggy. With the new checkbox you will solve all problems
3) Writer2ePub seems to assume what the size and width of the ebook will be, and scales the images down to that. I want more control: I want to use OO/LO page format to determine size and have Writer2ePub respect that size and not scale the images.
This point is not so clear for me… ePub files are created for a large variety of screen sizes. So the text, and even the images, must adapt to the available space. I choose to manage the image dimension in this way:
– for images inserted along the text, the width relative to the page is retained. In other words, if the image in the .odt document gets 50% of the page, in the ePub willl be 50% of the display, regardless the dimension of the display (this behaviour is important to retain the graphic balance of the page, and to avoid to make the images huge in small displays). This is dome by add a width="xx%"> in the <img> tag and is easily editable.
– for images that are in height 80% or more of the page, these retain the relative height instead of width. This preserves the "full page" images and scale them to the display. Is obtained with height="xx%" in the <img> tag.
I want to be able to make changes to the stylesheet and have Writer2ePub use those changes in the stylesheet in the working files and NOT create a new strylesheet each time I run Writer2ePub.
If you need a personal CSS you can change the W2E code as described in the manual:
Don't forget to copy in a safe place the modified CSS, because it will be rewritten when the extension updates.
In the future I wish use an external CSS sheet, and the user will be able to edit the standard CSS or use an alternate one. But at the moment this is not a priority for me.
I'm also studying for a visual style editor inside W2E, but it needs a lot of work (help from experienced programmers is appreciated!
I will send to you the first stable beta 1.2 with the new image handling as soon available, if you have some suggestions to implement a better solution please feel free to contact me!