Here's Canti v1.93
Note: Thanks to everyone for their input, a lot of the features in this update were user requested.
Note 2: I was doing too many code changes at once so I decided to release the update in its current state. There is still some stuff I am working on so expect another update in the not too distant future.
New to version 1.93:
-Bug fix: Kindle bookmark may be incorrect
When first created, the Kindle bookmark should point to the first image in the folder (for example, 0000.jpg).
However, Canti was using the name of the first image prior to processing, meaning that if the file extension changed (for example, .png -> .jpg) then the bookmark wouldn't point to the new name.
This has been fixed.
-Bug fix: When resizing to another orientation, the orientation geometry was ignored
This is a bit hard to explain, let me just give an example. If you set @width to 600 and @height to 800 (i.e. a portrait scale) and tried to resize a landscape scan, the resize geometry was reversed.
This was an issue with the way ImageMagick interprets resize calls, but I was able to fix it by giving Canti some more intelligence when making the resize call to ImageMagick.
-Auto split page side borders
If you enabled @auto_split_landscape_scans and @add_border, this determines if split scans should have borders added to the left/right side to best represent the original physical page side.
As a more visual example, enabling this feature will result in [border][left page] for the left page of a split and [right page][border] for the right page of a split.
This is set up in the .properties file.
-Meaning of @auto_rotate changed
Before, @auto_rotate would rotate all landscape scans to portrait orientation.
Now, @auto_rotate rotates any scan whose orientation does not match the target orientation (based on @width and @height).
If @width and/or @height is set to -1, then target orientation is assumed to be portrait.
This is set up in the .properties file.
-Adjust contrast
Adjusts the contrast level of the output images.
The value represents how many times the contrast adjustment alogrithm should be run on an image (for example, a value of 3 would result in the contrast algorithm being run three times).
A positive value will increase contrast, a negative value will decrease contrast, and a value of 0 leaves the contrast unmodified.
Personally I think contrast adjustments should be done manually on a per image basis (so I leave this disabled). If you are going to use this feature, I recommend using a small value (1 or -1).
This is set up in the .properties file.
-Auto-level
Uses the ImageMagick -auto-level feature to balance colors.
Description from the ImageMagick website: "It finds the exact minimum and maximum color values in the image and then applies a -level operator to stretch the values to the full range of values."
This is set up in the .properties file.
-Handle read-only parent_folder
Canti normally uses parent_folder for some temporary files (namely unarchiving zips/rars in parent_folder, or converting a pdf in parent_folder to an image folder), but this isn't possible if parent_folder is read-only.
Now Canti can handle a read-only parent_folder. If Canti detects that parent_folder is read-only, it will use a temp folder in output_folder.
Of course, if parent_folder is read-only, features like @archive_parent_image_folders and @unarchive_parent_image_archives are disabled.
-New Other Operation: Analyze Manga Folder
Canti will analyze all the image files in the given manga folder and give you image statistics such as width, height, and dpi.
This is strictly for testing purposes and is not needed for manga processing.
See the -Other Operations- section of the readme for more details.
-New device: k3
You can specify "k3" as your device when creating a .properties file. Not a big deal since the specs for the k3 are the same as for the k2.
-Various bug fixes and optimizations
You know the drill, every time I tinker with the code I always find little things to fix.
Enjoy