For odd pic (for even pic start on 2): Record: select row 1. Copy/paste (layer 1 created). Now record: select layer trans, move selection 2 pix down, select background, copy, paste, move layer to front layer. Now you make the action dupe those second steps 239 times. Then have the action link/select all the layers and align to top. Then have the action unlink everything and move layer 240 down 239 pix. Then link everything and distribute centers. Flatten.
This method is totally dependent on the files being of a certain size, but it sounds like you have that controlled. Building the action will be a pain. But then again, if it’s complicated it feels so good (I’m important!).
Mr. Maloney – thanks! Let me try this approach. I have to try SOMETHING.
In Illustrator you can release selections to new layers, but not in PS.
Let’s give this a try.
Are you trying to de-interlace? There’s an option under Filter-Video-De-Interlace, but it interpolates in pixels.
Not quite de-interlace, no. I thought of that, and I’ve used it before on frame grabs.
There are alternating pixel rows that are missing (transparent) that I want to REMOVE, and consequently shorten the height of the file.
If each pixel row were on a separate layer, I could distribute them precisely on top of each other.
I will end up with two files eventually, one containing the ODD fields, and one containing the EVEN fields. But these files will NOT contain the transparent (missing) pixel rows.
Hard to explain, but Thank You!
Tom:
I would process one file at a time, creating even and odd files, as opposed to breaking out two files using masks (as you seem to describe) and then processing those. I’m 95% sure you can action this to a batchable action (serial numbered even/odd files, not filename-prefix, if that makes sense). When creating the 239 dupes: dupe one set, then select both sets, dupe both, then select four, dupe those and so on. Do this in a blank action to make it easy to determine what you’re duping. I created an action with 1024 sets of steps this way, which is more than enough to process both even/odd files, link everything, copy merged, save out, etc. If you’re using CS3 the linking is much more simple: link layers 1 through 240 selecting all, vs: select layer 1, layer 2, layer 3, …
If you merge linked and copy to a new file called "odd," then when you batch the action you can create 001_odd.psd, 001_even.psd, 002_odd.psd, 002_even.psd, … Get the receiver to sign off on receiving renamed files and then no handwork for you. Or bug the scripting folks in that forum and they might be able to help you with naming the resultant files based on original.
J
But I think Peter’s right. Deinterlace and then resample nearest neighbor 1/2 vertical should do it.
It sounds like he absolutely needs the two separate files, with the odds and evens chopped out and the final images being half the original height. If that’s the case, then deinterlacing won’t help, but if the point was to get a final image from two images, one containing the important info in the odds and the other the info from the evens, then you could do something via deinterlace, then with a difference layer to generate an alpha mask and knock out one from the other, or just making the mask manually.
I’m pretty sure de-interlace set to duplicate and then a vertical image size (down to 854 by 240, nearest neighbor) will get him exactly the file he desires. Certainly exactly the file my rocking action would produce. Counter-intuitively, he’ll need to use the even setting for odds and odd for evens. He’ll need to de-interlace the image twice to get the two files.
You could cut out the transparent areas without using multiple layers. I wasn’t sure if all of these actions would be actionable but it looks like they work fine.
Setting a marquee selection to 1px height and the width of the image, you can record an action that selects the top row of pixels, switch to move tool, nudge it down one row (to cover the transparent row below), switch back to marquee tool, hold shift and add to your selection so you have the two rows of pixels selected, nudge down, shift-select to add the third row, nudge down, etc. After all the rows have been moved down into the bottom half of your canvas, go to Image-Trim-transparent pixels.
After you make your first selection, begin recording the action of moving and selecting subsequent rows, then you can simply run the action on either your odd or even images after selecting the top row of pixels. It’s a lot of manual work to do the first time, but after that it’s just a matter of clicking a button.
I’m pretty sure de-interlace set to duplicate and then a vertical image size (down to 854 by 240, nearest neighbor) will get him exactly the file he desires.
Ah, didn’t see the part about image sizing. Yes, using nearest neighbour should just knock out every other line. In that case, deinterlace on dupe and image size with nearest neighbour would be really simple!
PeterK:
If you get the file already parsed, just run de-interlace duplicate and then scale down. Don’t go repeating my foolishness! Patent pending and all. 🙂
You got it! Are you making fun of me? 🙂
One more way, start with a document with just a background, run script, remove background and flatten and save.
Start all over again this time uncomment line 5 and comment line 6.
var startRulerUnits = preferences.rulerUnits;
preferences.rulerUnits = Units.PIXELS;
var doc=activeDocument;
var Height = doc.height.value;
//for(var a = 1,z =1; a<height;a++,a++,z++){
for(var a = 0,z =0; a<Height;a++,a++,z++){
doc.activeLayer = doc.artLayers.getByName("Background");
selectLine(a);
doc.selection.copy();
doc.selection.deselect();
selectLine(z);
doc.paste();
doc.selection.deselect();
}
preferences.rulerUnits=startRulerUnits;
function selectLine(lineNo){
var Width = activeDocument.width.value;
var selRegion = Array(
Array(0, lineNo),
Array(Width, lineNo),
Array(Width, lineNo+1),
Array(0, lineNo+1),
Array(0, lineNo)
);
activeDocument.selection.select(selRegion);
}