トップページ > 記事閲覧
Autotrim Border (Idea)
投稿日 : 2013/04/07 07:56
投稿者 John Critton
参照先
Hi,
a lot of comics I read do have very large border around the comic panels. So I can not find a suitable zoom setting in ComicGlass to easily read them. So I usually crop each comic page in a graphic program before reading the comic. But this is a very time consuming work since you have to make sure that nothing important is cropped.

Therefore I would love to see an "Intelligent Zoom" in ComicGlass, that would automatic zoom the page so that the large border is not visible, but everything of the content.

However, implementing such a "Intelligent Zoom" Mode might not be an easy task, so I came up with this idea:

I could add a special file (lets call it "Trim.txt" in this example) to the CBR/CBZ File that would tell ComicGlass where the content of each file is located. So ComicGlass could adjust the Zoom Setting of every Page according to the information in the Trim.txt file. No change of the Images in the CBR/CBZ Files would be necessary.

In the example Image I have marked the content area that is described in the Trim.txt file with a red frame. ComicGlass should then follow the Fit Height", "Fit Width" and "Fit Page" Zoom settings to display and center the red framed part only. But the area outside of the red frame should not be cropped. (see 2nd Picture)
So the user could drag and move the page to see the part of the page outside of the red frame. After releasing the finger, the page would then bounce back to the previous view.

The beauty of this solution is:
1) you might be able to reuse some code from the PDF Trimming solution already implemented in ComicGlass.
2) No Picture Information is lost, since nothing is cropped
3) Trimming is available for more people because the trim.txt file can be made with freeware tools compared to the PDF Trimming solution
4) The Trim.txt file can be generated automatically

-End Part 1-

Re: Autotrim Border (Idea)
投稿日 : 2013/04/07 07:59
投稿者 John Critton
参照先
-Part 2-

My solution for generating that the "Trim.txt" File is to use the very powerful ImageMagick Tools. Those are available for free for all major operating systems at http://www.imagemagick.org.

The following command would "trim" all JPG Files in the current directory and write the Trimming Information in the Trim.txt file. No Picture would be altered during the process.

Aggressive Trimming:
(reduces Page Number and Text outside of the Comic Frame)
"convert.exe *.jpg -morphology Dilate Octagon -fuzz 30% -trim -format "%f %P %O %@" Info:>>trim.txt"

Save Trimming:
(keeps all text and Page Numbers)
"convert.exe *.jpg -morphology open Octagon -fuzz 20% -trim -format "%f %P %O %@" Info:>>trim.txt"

Those Lines would result in something like this:
"1.jpg 1920x2775 +64+121 1856x2429+0+0"
Explanation:
1.jpg = Filename of the Picture
1920x2775 = Picture Size
1856x2429 = Size of the red framed Image Part
+0+0 = can be ignored
+64 = x-coordinate of the upper left edge of the red framed Image Part
+121 = y-coordinate of the upper left edge of the red framed Image Part

If you want to see results of the trim process, you could change the command line like this to produce pictures instead of the Trim.txt file:
"convert.exe D*.jpg -morphology Dilate Octagon -fuzz 30% -trim trimmed.jpg"

Sorry for this long post.
I hope you find the Autotrim Feature as useful as I do.

I would love to see something like this implemented in ComicGlass.

Best Regards
John Critton
Re: Autotrim Border (Idea)
投稿日 : 2013/04/10 23:19
投稿者 Admin
参照先
ご提案を頂き、ありがとうございます。

私は余白の自動削除を開発中です。

手動でトリミングエリアを設定することも良いアイデアだと思います。

PDFファイルではトリミングの設定を手動で定義できます。
Re: Autotrim Border (Idea)
投稿日 : 2013/04/11 05:08
投稿者 John Critton
参照先
Sounds good. I'm looking forward to this new feature.

Best regards
John Critton
Re: Autotrim Border (Idea)
投稿日 : 2013/04/14 06:55
投稿者 John Critton
参照先
On a 2nd thought:
It would really be helpful to have the ability to manually set some kind of "trim Box" on CBR/CBZ Files. I really don't like the Idea of converting CBR/CBZ in PDF Files.
And beside that, manually adjusting the trimbox on each page would be a painful experience: Most "Auto Trim" algorithm do treat stuff like the page number as content so the result is not as good as it could be.

With the imagemagic approach, you could adjust the trimming to each comic, but still have all pages of one comic trimmed automatically. And you have tons of options to adjust the trimming.

Please consider implementing some kind of "trim box" support for CBR/CBZ. This would really save me a lot of time, that I now spend preparing the Comics for my iPAD. And I wouldn't mind if such a feature would come as in App purchase.

Best Regards
John

Re: Autotrim Border (Idea)
投稿日 : 2013/04/15 01:53
投稿者 John Critton
参照先
It's me again. Sorry for not checking the facts before posting.
I have now found a CBR<->PDF Programm that can convert in any direction without touching the pictures:
http://code.google.com/p/cbr-converter/

And I have figured out how to add an TrimBox in the PDF by editing the PDF "Source Code" directly. So I can use ImageMagick to calculate the TrimBox and some AHK programming to "patch" the PDF. Once I have a working flow I will post an "How To" here.

So this thread can be closed.

Best Regards
John Critton
Re: Autotrim Border (Idea)
投稿日 : 2013/04/16 00:06
投稿者 Admin
参照先
The manual set point using a text file will also be introduced when I mount automatic deletion of unfilled space next.

Thank you.

- WEB PATIO -