View Single Post
Old 06-30-2018, 03:03 AM   #7
dr_Fell
Junior Member
dr_Fell began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Aug 2016
Device: Cybook Odyssey
Thank You all for help! Problem seem to be solved. I have paid a lot of money (at least for me) for that book and I am glad I can use it now

I downloaded graphics, edited them, then put it back to the book. It didn't work well with epub (don't know why), but it works with original AZW3 file.

I added 5px white border to images using ImageMagick tools (workaround so my reader just cuts those white border and not the actual image). Additionally I adjusted size and sharpened all images, so my reader won't have to change resolution on the fly (for quality and readability). I also set a bit of negative left margins during conversion, so that the images could be a bit wider.
The code is now much more readable than in the original files provided by Amazon .

If this can be helpful for anyone, here are command line examples on how to batch change size and sharpeness:

Code:
 magick mogrify -format bmp *.jpeg    //convert every jpeg image to bmp for further loseless processing

magick mogrify -filter Mitchell -resize 550x730^> -format bmp *.bmp  //downscale images that are wider than 550px or higher than 730px, leaving smaller images untouched

magick mogrify -bordercolor white -border 5x3 -unsharp 0x1.1+2+0 -format jpeg *.bmp     //add white border and sharpeness to every bmp image and save back as jpeg
and the margins:

Code:
div span img {
 margin-left:-15px;
}

@davidfor - what do You mean by "post the code"? What code besides CSS styles can I post here? Debugger output?
I couldn't find "unpack book" feature - where is it located? This could be much faster than deleting and then uploading almost 2000 files using book editor...

Last edited by dr_Fell; 06-30-2018 at 03:12 AM.
dr_Fell is offline   Reply With Quote