View Single Post
Old 10-09-2010, 07:49 PM   #96
badbob001
Evangelist
badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.
 
badbob001's Avatar
 
Posts: 443
Karma: 1042602
Join Date: Sep 2009
Device: Kindle 3 (US 3G)
Quote:
Originally Posted by lilman View Post
Canti tells ImageMagick to only trim white, and should stop once it reaches any color outside of white fuzz. So if you want to use the same color border as was trimmed, set @add_border_color to white.
I'm pretty sure it's cropping a page that has a black background (see attached).

Is there a way to make auto_rotate not rotate a page if it is undersized? See the attached before.jpg and after.jpg.
The original size is 700x500. I have my device resolution set to 800x-1 so it should fit without change. But...
  • It's black background got cropped.
  • It got rotated.
  • It got shrunken.
  • The left and right sides got filled with a white background.
I'm not sure what really happened and why it got downsized. Perhaps it got downsized and then rotated?

I have another page that is 1103x803. Ideally, it would be rotated and shrunked to something like 800x1100. But it got rotated and shrunked to 587x803 and had borders added to the sides to create a final 800x803 image. I disabled borders and the image is still shrunken. Again no difference if I change max_dpi between -1, 167, and 72.

My settings with 1.92
Quote:
width (in pixels): 800
height (in pixels): original
maximum dpi: original
auto trim: true
trim fuzz: 15%
trim cancel: 0.7
add border: true
border color: white
auto rotate: true
color mode: grayscale
num colors: 256
pdf chapters: true
pdf r to l: false
archive chapters: false
epub chapters: false
auto bind: false
auto split landscape scans: true
split right page first: true
keep unsplit scans: true
allow auto split color scans: true
auto split gray strictness: 0.0
auto split color strictness: 0.0
auto split buffer: 0.0
auto sense landacape folders: false
use original filenames: true
archive input image folders: false
delete output image folders: false
image format: .jpg
kindle bookmark: true
comic zeal naming: false
ImageMagick home directory: C:\Program Files\ImageMagick-6.6.4-Q16\
unrar handler: C:\Program Files\WinRAR\Rar.exe
rar handler: C:\Program Files\WinRAR\Rar.exe
Quote:
Originally Posted by lilman View Post
You had to leave it running overnight??? Let me do a quick test to see how long 179 scans take to process on my laptop...
I really have no idea what is going on, but I see convert.exe using 8MB of ram and 2+GB of virtual memory. Now the harddrive is thrashing and it's very very slow, hence why I just left it running.

This a laptop has a Core 2 Due 2.26Ghz, 2GB ram and Windows XP. I'm going to increase the page file from 2GB to 3GB to see if that helps. How can I have canti skip the final PDF output step? What are the convert.exe parameters to create the final pdf from the processed images? I want to see if I can run convert.exe outside of canti but using the same parameters to see what happens.

In other news, I've made a batch file that makes it possible to invoke canti by dragging a folder or comic file onto a script file, avoiding the need to open a command prompt.

Open notepad, paste the following, and save as something like run.cmd in the canti folder.

Code:
@echo off
set parent_folder=%~1
set title=%~n1
set app_folder=%~dp0
set output_folder=%~dp0%~n1\

set parent_folder=%parent_folder:\=\\%
set output_folder=%output_folder:\=\\%

echo - Parameters ----------------
echo app_folder=%app_folder%
echo parent_folder=%parent_folder%
echo title=%title%
echo output_folder=%output_folder%
echo.
echo - To Run ----------------
set to_run=java -jar canti.jar -parent_folder "%parent_folder%" -title "%title%" -output_folder "%output_folder%"
echo %to_run%
echo.
pause
cd "%app_folder%"
%to_run%
pause
Then simply drag and drop a folder or comic file (eg: cbz, zip) and the script will assume the title is the folder/file name and output is located where the script is but in a subfolder named after the title.
Attached Thumbnails
Click image for larger version

Name:	before.jpg
Views:	127
Size:	18.9 KB
ID:	59613   Click image for larger version

Name:	after.jpg
Views:	113
Size:	10.9 KB
ID:	59614  

Last edited by badbob001; 10-09-2010 at 07:51 PM.
badbob001 is offline   Reply With Quote