View Single Post
Old 08-19-2012, 05:04 AM   #12
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)
Hi

Quote:
Originally Posted by JSWolf View Post

Can you post a couple of images before and after so we can see if we can see anything. Sometimes it's hard to see things in detail underneath the fog of fingerprints on an iPad.
In a previous post, I have used a manual solution, first ranking images according to their size and then reducing the ones which have the biggest size.

Here is an automatic solution which may be more convenient. I join some test images as asked to allow you to check if the images are fit for an EPUB display.

This mini-script makes use of Image Magick. Put the files to modify in one folder on your path. It will create a folder, named nouveau, and inside, it will insert files whose size have been reduced so as not to overcome 600 pixels in width or 800 pixels in height. All the files inside the test folder have the .jpg extension. Of course, you can change all these values above according to your needs.

Don't forget to press Enter in the terminal.

The joint folder essai contains 12 images (8,5 megs).
The folder nouveau contains the same 12 images but with a reduced size (1.14 meg).

Code:
mkdir nouveau
for FILE in *.jpg
do
 convert "$FILE" -resize 600x800\> nouveau/"$FILE"
done
Hope this could be of interest.
Attached Files
File Type: zip essai.zip (8.54 MB, 182 views)
File Type: zip nouveau.zip (1.14 MB, 206 views)

Last edited by roger64; 08-19-2012 at 05:32 AM.
roger64 is offline   Reply With Quote