Add files via upload

This commit is contained in:
frankmilliron 2017-12-28 06:58:58 -08:00 committed by GitHub
parent 392d31064b
commit 8423ae38ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 124 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@ -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;
}

View File

@ -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)