August 02, 2007

Links 2: A little bit of this, a little bit of that.

Author talks about the way that black bars appear on the sides (and sometimes top and bottom) of frame grabs. Linux geek that he is, he shows us the command line pipe he uses to strip them away.

Me, I do it using scripts for Paint Shop Pro. Creating a script for PSP8 is really simple; you tell it "record", then do it once yourself, then store the script. Then you can batch process as many images using that script as you want.

Usually I use three steps. The first step is "JPEG artifact removal". MPEG artifacts are similar to JPEG artifacts, so it works well for this. There are four strengths to choose among, so I take one typical image and just look at it magnified to see how it looks at each of the step levels. Ideally you want to use as little as you can, because at high strengths it does uncrispen lines and things like that.

Second step is a resize. I always take raw captures (720*480), and depending on the source material aspect ratio it gets resized to either 720*405 (16:9) or 640*480 (4:3).

And the third step is removal of the black bars. For that I use the "canvas size" function. For most shows I take four pixels off the left and right sides, but sometimes it's more complicated than that.

And the resulting script look like this:

from JascApp import *

def ScriptProperties():
    return {
        'Author': u'',
        'Copyright': u'',
        'Description': u'',
        'Host': u'Paint Shop Pro',
        'Host Version': u'8.10'

def Do(Environment):
    # EnableOptimizedScriptUndo
    App.Do( Environment, 'EnableOptimizedScriptUndo', {

    # JPEG Artifact Removal
    App.Do( Environment, 'JPEGArtifactRemoval', {
            'RestoreCrispness': 0,
            'Strength': App.Constants.JPEGStrength.Low,
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default,
                'RandomSeed': 71909484,
                'AutoActionMode': App.Constants.AutoActionMode.Match

    # Resize
    App.Do( Environment, 'Resize', {
            'AspectRatio': 1.5,
            'CurrentDimensionUnits': App.Constants.UnitsOfMeasure.Pixels,
            'CurrentResolutionUnits': App.Constants.ResolutionUnits.PixelsPerIn,
            'Height': 405,
            'MaintainAspectRatio': App.Constants.Boolean.false,
            'Resample': App.Constants.Boolean.true,
            'ResampleType': App.Constants.ResampleType.SmartSize,
            'ResizeAllLayers': App.Constants.Boolean.true,
            'Resolution': 2.5,
            'Width': 720,
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default,
                'AutoActionMode': App.Constants.AutoActionMode.Match

    # ResizeCanvas
    App.Do( Environment, 'ResizeCanvas', {
            'AspectRatio': 1.32636,
            'FillColor': (255,255,255),
            'HoriPlace': App.Constants.HorizontalType.Center,
            'MaintainAspect': App.Constants.Boolean.false,
            'NewDimUnits': App.Constants.UnitsOfMeasure.Pixels,
            'NewHeight': 405,
            'NewWidth': 712,
            'PlaceBottom': 0,
            'PlaceLeft': -4,
            'PlaceRight': -4,
            'PlaceTop': 0,
            'VertPlace': App.Constants.VerticalType.Center,
            'GeneralSettings': {
                'ExecutionMode': App.Constants.ExecutionMode.Default,
                'AutoActionMode': App.Constants.AutoActionMode.Match


Fortunately, I neither need to type that nor to read it ordinarily. That's how PSP8 talks to itself.

---The Atomic Fungus has watched a couple of episodes of Ikki Tousen: Dragon Destiny and is bewildered.

Ikkotousen Dragon Destiny--what is this? To say that I don't understand what the hell is going on in this series would not be overstating the issue. After two episodes I like to at least have an idea what is happening, and although I understand that the high schools in this series all have armies of "fighters" that fight to the death, I don't understand why this is so or what the point of it is. The story starts approximately in the middle of the beginning, with almost no exposition; that technique enables a "fast start" for the action, but you don't get much of an explanation of why, or even what. And it's uneven.

What is IT:DD? It's an excuse for fan service about bodacious babes who fight like crazed wolverines and who get their costumes shredded in said fights without suffering the slightest abrasion to their skin. If you're looking for anything deeper than that, you're watching the wrong series.

There is a story. It's a stupid one, but it's there. The reason it seems like you've been dropped into the middle of the story is that you have been. IT:DD is a sequel to the original IkkiTousen, which was produced by a different studio.

But it isn't really worth going into what the story is about, because the series is about watching Kan'u Unchou losing her clothes at every opportunity.

...moving right along...

---The owner of the FunBlog (doesn't anyone besides me have a real name anymore?) takes his best shot at trying to explain the fuzetsu from Shakugan no Shana. But his explanation, although clever, still doesn't deal with edge effects.

The fundamental question is where time freezes. As presented in the series, time inside the fuzetsu freezes but not outside, which is why those with power who are outside can detect that it's happening and enter the fuzetsu. But what if someone who doesn't have the power -- and doesn't know the fuzetsu is there -- tries to enter it? Presumably they freeze just inside the perimeter. Except that doesn't work.

If a fuzetsu covers part of a freeway, what happens to a car which enters the zone of the fuzetsu? And to the car just behind it, and the 500 behind that one? Big traffic pileup?

One fuzetsu in the series lasts for something like 14 hours. A freeway can pump a lot of traffic into the perimeter in 14 hours.

---Don has a real name! And he's found the perfect plushie to go next to the Cthulhu plushie that all the cool kids have on their shelves.

Posted by: Steven Den Beste in People at 11:48 PM | Comments (14) | Add Comment
Post contains 839 words, total size 11 kb.

1 An Anomolocaris plushie! I am filled with geek desire. 
Last summer when I was in Canada my Dad and I hiked up to the Burgess Shale site, quite illegally, of course.  I hear they opened it up to guided tours recently, however.  The view from there is stunning.
Regarding Ikkitousen, why do they spell her name Kan'u?  Is it another of those "the otaku are wedded to the misspelling on the cover" things like Tenjho [sic] Tenge?  Is it supposed to be Kannu? 
Puzzled in San Francisco....

Posted by: Toren at August 03, 2007 12:23 AM (hAvQ5)

2 I've watched a few more episodes of Ikki Tousen, and while I still don't know what is going on, at least I am beginning to understand who is who.

At least the fan service is entertaining.

Posted by: atomic_fungus at August 03, 2007 04:43 AM (unNIu)


Toren, I just looked into that and Wikipedia says that her name is spelled 關羽雲長.

關 == カン kan
羽 == ウ u

The problem seems to have been romanizing カンウ without making it look like かぬ kanu or かっぬ kannu. (The Wikipedia article romanizes her name as "Kan-u", which is little more satisfactory.)

Posted by: Steven Den Beste at August 03, 2007 07:45 AM (+rSRq)

4 I have a perfectly serviceable real name. But it's the nickname that's caused people to hire me on, so I'm hanging on to it. ;p

Posted by: Avatar_exADV at August 03, 2007 09:22 AM (LMDdY)

5 I mixed up hiragana and katakana in that comment above. My mistake, not anyone else's. The ウ should have been .

Posted by: Steven Den Beste at August 03, 2007 09:55 AM (+rSRq)

6 As far as I can tell, Jonathan Tappan, the owner of, never pretended to be anonymous.

Posted by: Pete Zaitcev at August 03, 2007 10:16 AM (9imyF)

7 Aha, I see.  The use of the apostrophe in romanized Japanese came long after my days sweating over textbooks, so I've never gotten in the habit of using it.  I say Kenichi, the otaku say Ken'ichi...let's call the whole thing off....
Kan'u is a pretty weird name, in any case.

Posted by: Toren at August 03, 2007 02:58 PM (hAvQ5)


The Japanese don't generally put ん just before one of the pure vowels; it kind of defeats the point.

Posted by: Steven Den Beste at August 03, 2007 03:27 PM (+rSRq)

9 ...although, as you say, "Kenichi" is like that...

Posted by: Steven Den Beste at August 03, 2007 03:28 PM (+rSRq)

10 The apostrophe was the original Hepburn method of dealing with that ambiguity in romanization, but it seems to be one of the first things that gets changed in the various "modified Hepburn" systems.

Probably the most common words that need it are giniro, renai, and konya, but they're so common that they really don't need it.

Gakken's 1973 text Japanese for Today uses the apostrophe, but only in six words: bon'yari, dan'atsu, han'ei, kon'ya, man'in, and ren'ai. Interestingly, it uses a hyphen for hon-ya, which I think is due to one of their other modifications of Hepburn, to show structure in compound words.


Posted by: J Greely at August 03, 2007 04:29 PM (2XtN5)

11 A lot of these problems go away if you read kana or kanji.  IMHO, romanji is the invention of the devil.  I strongly counsel all students of Japanese to begin with the kana as soon as possible (it generally takes no more than two weeks to learn to read and write them) and never look back.  Learning the 100-odd kana is nothing compared to the 3000+ much more complex kanji you'll be wrestling with soon enough.  Romanji is for dabblers.

Posted by: Toren at August 03, 2007 04:37 PM (jaaZk)

12 Oh, I agree, but the kana were one of the primary reasons that my first-quarter Japanese class went from 31 students to 17 by the fifth week. Judging from how many of the survivors still had trouble reading two years later, I'd have to say that two weeks might be enough to recognize and draw the kana, but really learning to read and write them takes a lot longer for most people.


Posted by: J Greely at August 03, 2007 05:36 PM (2XtN5)

13 If you want Kan'u Unchou fanservice, here's a PVC. (NSFW) There's also black and white gothic lolita figures of her for some reason.

Posted by: Jim Burdo at August 04, 2007 12:20 AM (niEEi)

14 I can't believe the commenter at that site that objected to the hair.  I mean, really, he shouldn't let his eyes wander like that. 

Posted by: ubu at August 04, 2007 05:04 PM (nW5/3)

Hide Comments | Add Comment

Enclose all spoilers in spoiler tags:
      [spoiler]your spoiler here[/spoiler]
Spoilers which are not properly tagged will be ruthlessly deleted on sight.
Also, I hate unsolicited suggestions and advice. (Even when you think you're being funny.)

At Chizumatic, we take pride in being incomplete, incorrect, inconsistent, and unfair. We do all of them deliberately.

How to put links in your comment

Comments are disabled. Post is locked.
22kb generated in CPU 0.14, elapsed 0.1097 seconds.
20 queries taking 0.0498 seconds, 31 records returned.
Powered by Minx 1.1.6c-pink.