Add files via upload
This commit is contained in:
parent
392d31064b
commit
8423ae38ae
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,95 @@
|
||||||
|
#target photoshop //works under Photoshop CS6 & MacOS
|
||||||
|
// Helps to restart Photoshop between script runs so that it doesn't slow down
|
||||||
|
|
||||||
|
|
||||||
|
var destFolder, sourceFolder, files, fileType, sourceDoc, targetFile, psSaveOpts;
|
||||||
|
|
||||||
|
|
||||||
|
// Select the source folder.
|
||||||
|
sourceFolder = Folder.selectDialog( 'Select the folder with PNG frame files you want to convert:', '~/Desktop' );
|
||||||
|
|
||||||
|
// If a valid folder is selected
|
||||||
|
if ( sourceFolder != null )
|
||||||
|
{
|
||||||
|
files = new Array();
|
||||||
|
fileType = "*.png" //prompt( 'Select type of Image files to you want to process. Eg: *.png', ' ' );
|
||||||
|
|
||||||
|
// Get all files matching the pattern
|
||||||
|
files = sourceFolder.getFiles( fileType );
|
||||||
|
|
||||||
|
if ( files.length > 0 )
|
||||||
|
{
|
||||||
|
// Get the destination to save the files
|
||||||
|
destFolder = Folder.selectDialog( 'Select the folder where you want to save the converted frames:', '~/Desktop' );
|
||||||
|
for ( i = 0; i < files.length; i++ )
|
||||||
|
{
|
||||||
|
sourceDoc = app.open(files[i]); // returns the document object
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Run Conversion Action
|
||||||
|
|
||||||
|
//app.load(File("~/my-actions.atn"));
|
||||||
|
app.doAction("Apple II:DITHER no save","Apple 2 GR Photoshop Actions.atn");
|
||||||
|
|
||||||
|
//TODO convert action to javascript commands
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Call function getNewName to get the new TIFF file's name
|
||||||
|
targetFile = getNewName();
|
||||||
|
|
||||||
|
// Call function getPSOptions get the PhotoshopSaveOptions for the files
|
||||||
|
TiffSaveOpts = getTiffOptions();
|
||||||
|
|
||||||
|
// Save as TIFF
|
||||||
|
sourceDoc.saveAs( targetFile, TiffSaveOpts );
|
||||||
|
|
||||||
|
sourceDoc.close();
|
||||||
|
}
|
||||||
|
alert( 'Files are saved in ' + destFolder );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
alert( 'No matching files found' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getNewName()
|
||||||
|
{
|
||||||
|
var ext, docName, newName, saveInFile, docName;
|
||||||
|
docName = sourceDoc.name;
|
||||||
|
ext = '.tif'; // new extension for image file
|
||||||
|
newName = "";
|
||||||
|
|
||||||
|
saveInFile = new File( destFolder + '/' + docName );
|
||||||
|
|
||||||
|
|
||||||
|
return saveInFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function getTiffOptions()
|
||||||
|
{
|
||||||
|
// Create the psSaveOptions object to set the AI save options
|
||||||
|
var TiffSaveOpts = new TiffSaveOptions();
|
||||||
|
|
||||||
|
TiffSaveOpts.alphaChannels = false;
|
||||||
|
TiffSaveOpts.annotations = false;
|
||||||
|
TiffSaveOpts.byteOrder.MACOS;
|
||||||
|
TiffSaveOpts.embedColorProfile = false;
|
||||||
|
TiffSaveOpts.imageCompression.NONE;
|
||||||
|
TiffSaveOpts.interleaveChannels = false;
|
||||||
|
TiffSaveOpts.layers = false;
|
||||||
|
TiffSaveOpts.saveImagePyramid = false;
|
||||||
|
TiffSaveOpts.spotColors = false;
|
||||||
|
TiffSaveOpts.transparency = false;
|
||||||
|
|
||||||
|
return TiffSaveOpts;
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
|
||||||
|
./ffmpeg -i /path/to/video.mkv /path/to/output-%05d.png
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
to crop a 16:9 video to 4:3 use this instead...
|
||||||
|
|
||||||
|
./ffmpeg -i /path/to/video.mkv -filter:v 'crop=ih/3*4:ih' /path/to/output-%05d.png
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
EXAMPLE:
|
||||||
|
|
||||||
|
cd /Users/Frank/Desktop/Vintage\ Computers/Apple\ II/Apple\ II\ Video\ 2017/-Assets/Frame\ Exporting
|
||||||
|
|
||||||
|
./ffmpeg -i (drop video location) (drop destination folder - delete space)/FRAME.%05d.png
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
./ffmpeg -i (drop video location) -filter:v 'crop=ih/3*4:ih' (drop destination folder - delete space)/FRAME.%05d.png
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Current render folder can process up to 7,800 frames
|
||||||
|
A 32mb prodos partition can support one large file of 16mb
|
||||||
|
1024k / 2 blocks per frame = 16,384 frames possible in a single file
|
||||||
|
|
||||||
|
|
||||||
|
16,384 frames at roughly 25 frames per second = 655 seconds (almost 11 minutes)
|
Loading…
Reference in New Issue