Scale Photoshop layer using AppleScript
Obviously, this is a Mac PS issue.
I am trying to script scaling a Photoshop layer (a smart object layer) to a specified percentage that I calculate from a layout in InDesign.
However, I am stumped on the syntax I should use to actually get the layer to resize, or perhaps I don't know how to call out the layer properly.
Here is my code (it is very simple at this point in time:
tell application "Adobe InDesign CS6"
set mySelect to selection
--error trap to make sure I have graphic content selected
tell active spread of active window
set thisBox to item 1 of mySelect
set HScale to the absolute horizontal scale of thisBox
end tell
end tell
myScaleConversion(HScale)
set PSScaled to result as real
tell application "Adobe Photoshop CS6"
set thisLayer to current layer of current document
set scaleSet to {horizontal scale:PSScaled, vertical scale:PSScaled, anchor:"top left"}
scale current layer of current document with scaleSet
end tell
on myScaleConversion(HScale)
set ScaleRatio to 2.5 as real
set PSScale to (ScaleRatio * HScale)
return PSScale
end myScaleConversion
I would appreciate any help with this. I run this script and no error messages occur, but then again, nothing happens to the Photoshop layer I have targeted.
There are 2 things I see that are not right… top right should a compiled word pair from the apps dictionary… You have it as string…
Now anchor should be anchor position but I can't get this to compile inside your list… hum… if I take it out it works just fine…
tell application "Adobe InDesign CS5"
activate
set mySelect to selection
--error trap to make sure I have graphic content selected
tell active spread of active window
set thisBox to item 1 of mySelect
set HScale to the absolute horizontal scale of thisBox
end tell
end tell
myScaleConversion(HScale)
set PSScaled to result as real
tell application "Adobe Photoshop CS5"
activate
set thisLayer to current layer of current document
--set scaleSet to {horizontal scale:PSScaled, vertical scale:PSScaled, anchor position:top left}
scale current layer of current document ¬
horizontal scale PSScaled ¬
vertical scale PSScaled ¬
anchor position top left
end tell
on myScaleConversion(HScale)
set ScaleRatio to 2.5 as real
set PSScale to (ScaleRatio * HScale)
return PSScale
end myScaleConversion
Similar Messages
-
Moving a layer in Photoshop CS5 using Applescript
I have a layer in a document called "logo" and i want to duplicate it to every open document and then move it to a specific spot in each document
I got the duplicating thing happening but cant seem to move the bounds of the layer (says it is read only and cannot be changed)
here is what I have written
tell application "Adobe Photoshop CS5"
activate
set theDocs to count of documents
repeat with i from 1 to theDocs
duplicate art layer "logo" of current document to document i
end repeat
repeat with i from 1 to theDocs
set current document to document i
tell document i
set bounds of art layer "logo" to {0.456666666667, 6.38, 2.88, 6.77}
--Adobe Photoshop CS5 got an error: Property is read/only and cannot be changed
end tell
end repeat
end tell
This doesn't error but also doesn't move the logo at all
tell application "Adobe Photoshop CS5"
activate
set theDocs to count of documents
repeat with i from 1 to theDocs
duplicate art layer "logo" of current document to document i
end repeat
repeat with i from 1 to theDocs
set current document to document i
tell document i
set properties of art layer "logo" to {bounds:{0.456666666667, 6.38, 2.88, 6.77}}
end tell
end repeat
end tell
anyone know what the language is to move the layer around?In any language the way to move a layer x,y is to use translate… You will need to do the math from current x,y to required x,y given a distance… A read only property is just that regardless of language… Here is a quick example of how I did this kind of thing using Applescript… I still do the same method now but use the ESTK instead…
tell application "Adobe Photoshop CS2"
activate
-- Store the app settings
set User_Rulers to ruler units of settings
set User_Dialogs to display dialogs
set ruler units of settings to pixel units
set display dialogs to never
set Doc_Ref to the current document
tell Doc_Ref
-- Store the image res so we can put it back
set Original_Res to resolution
-- Change to work at 72 dpi
resize image resolution 72 resample method none
-- Move horizontal 1 inch
translate layer 1 delta x 72 as pixels
-- Move vertical 1 inch
translate layer 1 delta y 72 as pixels
-- Read the bounds propety
set Layer_Bounds to bounds of layer 1
log Layer_Bounds
-- Move the layer using bounds to top/left
translate layer 1 delta x -(item 1 of Layer_Bounds) as pixels
translate layer 1 delta y -(item 2 of Layer_Bounds) as pixels
-- Put back the image res
resize image resolution Original_Res resample method none
end tell
-- Put back the app settings
set ruler units of settings to User_Rulers
set display dialogs to User_Dialogs
end tell
You should get the general idea of how this works from this. It should move the first layer across 1 inch, down i inch then put it top/left. It assumes you have a layer that is not a background layer nor is it locked in any way… -
Can the Adobe Photoshop Layer Support with Captivate 4 be use to show a Zoom & Pan Effect?
I'm working with a client that is interested in creating the "Zoom & Pan" effect you get with Camtasia using Captivate 4. I'm not finding enough information to support that this is possible with Captivate 4. The Photoshop Layer Support feature with Captivate 4 comes across as something that may work to some degree however, it is again unclear if it would definitely work to give the zoom & pan effect I am looking for. Would anyone mind explaining this feature in greater detail and/or offering any ideas for how I can show the zoom & pan effect in Captivate 4?
Hi there
LOL, good luck with that!
NOTHING in Captivate will achieve what you are seeing in Camtasia. Sorry, there simply is no comparison. Sure, Captivate has panning while recording, but what you end up with are several herky jerky snapshots of suddenly being in a different screen area. Sort of reminds me of walking through a room while slowly closing and opening your eyes. In other words, you are seeing version 1 of the panning feature. We hope it improves, but it's not there yet.
If you have Camtasia, you could combine it with Captivate for some nice and interesting effects and have the best of both worlds! I do that.
Cheers... Rick
Helpful and Handy Links
Captivate Wish Form/Bug Reporting Form
Adobe Certified Captivate Training
SorcerStone Blog
Captivate eBooks -
I'm currently tasked with reformatting 3,000 product images (thumbnail, normal, and large sizes for each) for a new online store. To do that, I'm trying to create a Photoshop (CS6) action that can automate the process as much as possible because I have a hard deadline and not a lot of time to get it all done. Where I'm running into issues is scaling the images automatically once I've used File-->Place. My canvas sizes are all square (670px X 670px, 250px X 250px, and 125px X 125px), but the product images I'm placing on the canvases are almost always rectangular with the height greater than the width at about a 2:3 ratio. I need to scale them so that the image is touching the top and bottom edges of the canvas and the width is adjusted accordingly with the image centered horizontally.
I found the program below on another thread, but it's not working exactly like I need it to. It mentions "maintain aspect ratio," but when I run it, the image I'm trying to place ends up getting stretched to fill the entire canvas rather than the width adjusting to the height once the height has reached its maximum. I have no experience with JavaScript, so I'm having a difficult time adjusting the code to meet my needs. Any help would be greatly appreciated since I am a writer who is WAY out of his comfort zone.
var maintainAspectRatio;// set to true to keep aspect ratio
if(app.documents.length>0){
app.activeDocument.suspendHistory ('Fit Layer to Canvas', 'FitLayerToCanvas('+maintainAspectRatio+')');
function FitLayerToCanvas( keepAspect ){// keepAspect:Boolean - optional. Default to false
var doc = app.activeDocument;
var layer = doc.activeLayer;
// do nothing if layer is background or locked
if(layer.isBackgroundLayer || layer.allLocked || layer.pixelsLocked
|| layer.positionLocked || layer.transparentPixelsLocked ) return;
// do nothing if layer is not normal artLayer or Smart Object
if( layer.kind != LayerKind.NORMAL && layer.kind != LayerKind.SMARTOBJECT) return;
// store the ruler
var defaultRulerUnits = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
var width = doc.width.as('px');
var height =doc.height.as('px');
var bounds = app.activeDocument.activeLayer.bounds;
var layerWidth = bounds[2].as('px')-bounds[0].as('px');
var layerHeight = bounds[3].as('px')-bounds[1].as('px');
// move the layer so top left corner matches canvas top left corner
layer.translate(new UnitValue(0-layer.bounds[0].as('px'),'px'), new UnitValue(0-layer.bounds[1].as('px'),'px'));
if( !keepAspect ){
// scale the layer to match canvas
layer.resize( (width/layerWidth)*100,(height/layerHeight)*100,AnchorPosition.TOPLEFT);
}else{
var layerRatio = layerWidth / layerHeight;
var newWidth = width;
var newHeight = ((1.0 * width) / layerRatio);
if (newHeight >= height) {
newWidth = layerRatio * height;
newHeight = height;
var resizePercent = newWidth/layerWidth*100;
app.activeDocument.activeLayer.resize(resizePercent,resizePercent,AnchorPosition.TOPLEFT);
// restore the ruler
app.preferences.rulerUnits = defaultRulerUnits;Hum Im not sure Im getting you here… Have you looked at Image Processor…?
Why are you NOT just using Fit Image and canvas size in your actions…?
These are all built-in to Photoshop.
If you wanted to do all 3 sizes in the 1 fly-bye then use script to process…
If you need extra file naming conventions then script would probably be best…
All of the above should have NO trouble handling your 3k files… -
Scale a layer so it matches the image size. (Automate)
I need to scale a layer so it matches the image size.
The problem is that i need to automate this procedure and apply on a range of images all with different resolutions. (This is why i can't use CTRL+T and just drag the corners of the layer so it fits the image)
The layer that i need to resize is 2000x1500 pixels.
The images that i need the layer to match varies between 3000x2000 pixels and 5000x4000 pixels. (I know all about quality loss when i scale UP so please don't give me a lecture this).
It doesn't matter if the layer proportions changes.
I use Photoshop CS5.jojonsson wrote:
I need to scale a layer so it matches the image size.
The problem is that i need to automate this procedure and apply on a range of images all with different resolutions. (This is why i can't use CTRL+T and just drag the corners of the layer so it fits the image)
The layer that i need to resize is 2000x1500 pixels.
The images that i need the layer to match varies between 3000x2000 pixels and 5000x4000 pixels. (I know all about quality loss when i scale UP so please don't give me a lecture this).
It doesn't matter if the layer proportions changes.
I use Photoshop CS5.
You state layer but do not state much more. Do you know how many layers these files will have. Will it always be the same layer in the layer stack that needs to be transformed. You state that it doesn't matter if the layer proportions changes by that do you mean you don't care if the layers aspect ration changes and its content becomes very distorted. Layer also supports transparency they need not be a rectangle transforming these layers will not fill in the transparent area or make the rectangular.
You may be able to automate this with a script. Install the ScriptListener and perform the transformation you want to do is steps. Use Ctrl-T set the anchor point to the top left corner and move the layers top left corner to the canvas's top left corner by entering 0 in the x and y fields . Then do a Menu Image size just to get the width and hight of the canvas in pixels and to make sure that the transform is written to Photoshop's script files. Then do a Ctrl-T again with the anchor point top left set the w and h fields to the width and height pixel sizes of the canvas. Also record these steps i an action so you can see how Photoshop does the transforms. You will see Photoshop records the steps and the value he used for the move to Top Left corner were calculated from the Layer original location. You would need to make this same calculation in the script. Un install the plug-in and extract the transforms steps from the Photoshop script files you may now have the information you need to do the transforms you will still have to learn Photoshop scripting to learn how to get document canvas sizes and layer sizes and process the layers. Not an easy task..... -
CS2 issues, best version of Photoshop to use with AGS?, workarounds?
It looks like there's some compatibility issues with AGS and CS1/CS2. What's the best version of Photoshop to use with AGS, and like everyone asks, anyone know of an update coming?
My problem btw is that I'm generating many .gif images from 1 source .psd file, and the text alignment for horizontal left/right is not true to the original. The shift is off the canvas. Only center alignment stays true.
My .psd file is only a background layer and a type layer. I once was able to save the .psd in ImageReady and output correctly, but that happened only once and wasn't able to replicate the results.
Anyone know of way to preserve text alignment?Thanks for the response Bob. I'm going to try and track down Photoshop6 and give that a go. Just to fill this log up with more info, I thought I'd past this response which I wrote to someone else. Btw, I heard a rumor that Adobe may be releasing an update to AGS in the spring. Do you you know anything about that?
Hey ###,
Thanks for getting back to me. With AGS, our goal is to produce about 250k unique images based on a customers first name, which we will then merge into an email. We're able to produce the images using our data and technology, where just not able to maintain the accuracy of the intended creative. Below is a PSD which contains 2 layers, 1 text layer with effect and 1 solid color layer...
http://images.ed4.net/images/htdocs/test/di/ditext.psd
The output should look like this...
http://images.ed4.net/images/htdocs/test/di/original.gif
Instead, the text layer shifts off the canvas far to the left. On right alignment, I get the same results, just far to the right. Center alignment works fine. I didn't know if we should be keying in any additional commands to get this to line up right? Would Photoshop6 resolve this issue?
http://images.ed4.net/images/htdocs/test/di/Adam.gif
http://images.ed4.net/images/htdocs/test/di/Dan.gif
http://images.ed4.net/images/htdocs/test/di/Jim.gif
http://images.ed4.net/images/htdocs/test/di/Jonathan.gif
http://images.ed4.net/images/htdocs/test/di/Matt.gif
Thanks in advance ###. I'd love to hear anything you know about a new AGS release.
Jim -
Having trouble using applescript to save pdf as excel spreadsheet
I have been trying to use applescript to create an automator action to convert some downloaded PDF's to .xlsx format. After reviewing a good bit of the SDK documentation, I came up with the following scripting:
tell application "Adobe Acrobat Pro"
open theFile
save front document to file theNewFile using conversion "com.adobe.acrobat.xlsx"
close front document
end tell
This script works fine when I use the "com.adobe.acrobat.plain-text" conversion or the png or jpeg conversion. However, I cannot get it to work with "com.adobe.acrobat.xlsx" or "com.adobe.acrobat.spreadsheet". Note that although I didn't copy the code here that sets theNewFile variable, I have been changing it to the appropriate file extension when changing conversion strings.
When I execute the script using one of the problem conversion strings, Acrobat opens the file successfully, but it just sits there, as if it does not understand the save command at all.
I guess I should mention that the whole goal here is to actually convert the PDF's to CSV eventually. The next step was going to be to open the file in Excel and save as CSV. If anyone knows a *free* way to go straight from PDF to CSV using Applescript/Automator without having to go through all these other programs, I would be very appreciative for the suggestion. This conversion is just a small part of a very lengthy workflow but it is causing me the most trouble.Hello Jonathan,
Ok i have only one final question.
Do you know how to work in photoshop, don't you? Ok i think yes.
Well i have 2 ways to do that, i did one action from photoshop that will get the image inside folder and will convert this image in pdf. Abouve the line of script
that you have to attach to folder action and the action for Photoshop.
About the action for Photoshop give me your email address and I send you, or do it your self. You have to do this: open one image in JPG, go to action, go new set, put your name of set, put the name of action if you like you can change the name, go print with preview, print and set save as PDF close your file and stop the action.
Now that you have to do is put all your files inside your folder and leave the Photoshop do it for you, ok?
Good Luck
Hack
property speak_alert : false -- if true, the script will speak the alert. If false, the script will display an alert dialog
property dialog_timeout : 30 -- set the amount of time before dialogs auto-answer.
property copychecksindicator : false
property itemcheck_delaytime : 2
property foldercheck_delaytime : 3
property speciallabelindex : 7
on adding folder items to this_folder after receiving added_items
if copychecksindicator is true then
set the added_items to my checkaddeditems(the added_items)
if the added_items is {} then return "no vaild items"
end if
tell application "Finder"
activate
set this_folder to choose folder with prompt "pdf"
set these_files to every file of folder this_folder
end tell
tell application "Finder"
repeat with i from 1 to number of items in these_files
set this_path to (item i of these_files) as string
tell application "Adobe Photoshop CS2"
launch
open file (this_path as string)
set this_files to current document
do action "Jpg" from "Jpg para Pdf"
end tell
end repeat
end tell
end adding folder items to -
Resizing an image in a layer using values from another layer
After resizing an image on a layer, is it possible to easily copy the resized width & height (pixel) values to images on other layers? If so, then how? I'm guessing there's an easy way, but it eludes me. Copying the values manually is okay with just a couple of layers, but rather tedious for changing many layers.
You could record an action to resize the layers. You could use the action only
on one layer at a time.
1. Pick the layer you want to have the other layers resized to and find the pixel dimensions
of the layer i.e w 422 x h 830.
2. Pick the layer you want to resize and make it active.
3. Start recording the action following the steps below:
(the menu commands are in red)
4. When you get to the image size dialog, set as below with your own
pixel dimensions. Don't change anything in the document size from
how it's set when the dialog opens.
5. After you record the action set the image size dialog so it opens
whenever you run the action so you can change the pixel dimensions.
Click in the box to the right of the checkmark (highlighted above in red)
More info on recording actions
http://help.adobe.com/en_US/photoshop/cs/using/WSfd1234e1c4b69f30ea53e41001031ab64-7451a.h tml
You can align or distribute layers with the move tool
more info
http://help.adobe.com/en_US/photoshop/cs/using/WSfd1234e1c4b69f30ea53e41001031ab64-78c2a.h tml
http://help.adobe.com/en_US/photoshop/cs/using/WSfd1234e1c4b69f30ea53e41001031ab64-78c1a.h tml
MTSTUNER -
Cs6 photoshop layer thumbnail missing
The cs6 photoshop layer thumbnail is missing when I work with layers. The background layer shows, but when I use duplicate or new adjustment layer it's a white blank. This just started. Help?
This feature will available to you on June 17th when Photoshop CC launches along with the rest of the new CC apps.
Sorry to get you all excited about these new features, only to leave you hanging with a month-long wait. -
Extract XMP metadata from specific Photoshop Layer in After Effects
How do it extract XMP metadata from specific Photoshop Layer in After Effects?
I am just getting my hands dirty with metadata.
I know it is possible to attack metadata to a layer/layerset in Photoshop, but how to I get it out in After Effects.
Here is the process.
I create BunchaLayers.psd.
Using the PerLayerMetaData.jsx file attached.
I use the setCommMetadata("something") function to attacked metadata to a selected layer.
I know that is is there because I check it using the exportLayerMetadata().
I save and imprt BunchaLayers.psd into AE as a comp.
Here I am lost.
I select my layer in the project window and check the XMP metadata window.
I can't find my comment.
Is the XMP data actually attached to the layer I imported in AE?
I want to be able to select the layer and see that the data is attached. Is this possible?
If it is will it work on layersets (comps in AE)?
I would appreciate any layer specific XMP insight.
Thanks for looking.
- JoshJohn Nack on Adobe : Per-layer metadata comes to Photoshop
This was the article that made me think this might be possible.
There is also the preference to Create Markers From Metadata
["Metadata"]
"CreateLayerMarkersFromFootageXMP" = 01
Which made me wonder if there is a way to create the metadata in the first place that made it something AE would read and automatically change to layer markers.
Any ideas? -
How do I get the Photoshop layer tags in JavaScript?
I asked this question at graphic design stack exchange but they pointed me here:
http://graphicdesign.stackexchange.com/questions/35374/how-do-i-get-the-photoshop-layer-ta gs-in-javascript?noredirect=1#comment48962_35374
I want to do actions based on the tagged layer color (these thing 1) in Photoshop. I can't find a property inside the JavaScript documentation or the ExtendScript Toolkit that might contain the value.
I'd prefer not to abuse the name for that, the layer tags look like a very clean solution to my problem. If only I could fetch them.
Any Ideas?
Kind Regards,
MiiHi, these functions will select all your layers with the specified color:
use the command: selectAllByColor("red");
function getIDXwithsameColor(TheColor){// search and return a list of indexes for the layers with the specified color
var ref = new ActionReference();
var toRet = [];
try{activeDocument.backgroundLayer;var a=0 }catch(e){ var a = 1; };
while(true){
ref = new ActionReference();
ref.putIndex( charIDToTypeID( 'Lyr ' ), a );
try{var desc = executeActionGet(ref);}catch(err){break;}
var cl = desc.getEnumerationValue(charIDToTypeID("Clr "));
cl = typeIDToStringID(cl);
var ls = desc.getEnumerationValue(stringIDToTypeID("layerSection"));
ls = typeIDToStringID(ls);
if(ls != 'layerSectionEnd'){
if(cl == TheColor){
toRet.push(a);
a++;
return toRet;
function multiSelectByIDX(idx) {// selection function
if( idx.constructor != Array ) idx = [ idx ];
var layers = new Array();
var desc = new ActionDescriptor();
var ref = new ActionReference();
for (var i = 0; i < idx.length; i++) {
layers[i] = charIDToTypeID( "Lyr " );
ref.putIndex(layers[i], idx[i]);
desc.putReference( charIDToTypeID( "null" ), ref );
executeAction( charIDToTypeID( "slct" ), desc, DialogModes.NO );
function selectAllByColor(TheColor){// main function
theSameClIDX = getIDXwithsameColor(TheColor);
multiSelectByIDX(theSameClIDX);
//...example::
// selectAllByColor("none");
//selectAllByColor("red");
// selectAllByColor("orange");
// selectAllByColor("yellowColor");
// selectAllByColor("grain");
// selectAllByColor("blue");
// selectAllByColor("violet");
// selectAllByColor("gray"); -
Photoshop layer move and layer duplicate event ids
I am running PSCC 2014 on a mac. I work with a wacom table and keyboard shortcuts. I work fast without looking look at the keyboard. Often end up moving layers, duplicating layers inadvertently by pressing the wrong keys.
I have identified the keyboard shortcuts responsible for the layer shift/duplication and was able to record an action.
The idea is to setup a Javascript alert when the layer moves or duplicates using the Scripts Events Manager Photoshop Event dialog.
I have not been able to successfully add the Photoshop Event using the Event ID code 'copy' and ‘move’ listed in the Adobe Photoshop CC 2014 Javascript Scripting Reference guide.
The Adobe scripting listener plugin does not record the layer movement and layer duplication events.
When I replicate the problem the History pallet registers both, the layer copy and layer move events as a ‘move’ history state.
Other than Javascript Scripting Reference guide Is there a way to find out the exact event Id for a layer move and layer duplicate events?sorry, I wasn't aware you're using a mac. I know that in Windows, you can run additional software that will send you an alert every time you accidentally press those keys. It can even block the layer shift/duplication if you choose. I've just tried a sample here on my system and it works perfectly - every time cmd (in my case ctrl) is pressed, a tooltip at the mouse cursor will pop up, saying "CTRL is pressed". Additionally, whenever I press ctrl+option+drag, the tooltip instead says "Layer has been moved". I'm positive this can also be done on the mac.
you should look into a key remapping program for the mac that resembles AutoHotKey for Windows (which is what I'm using). It will allow you to send alerts every time you press those key/mousebutton combinations by accident. This is a solution I bet you can take care of outside of Photoshop, meaning that you won't need to rely on javascripting or anything.
Here's a webpage that gives a full list of mac software which are similar to AutoHotKey:
AutoHotkey Alternatives for Mac OS X - AlternativeTo.net
Keyboard Maestro seems to be the best bet but I wouldn't know for sure. Your solution will be in one of those programs for sure.
By the way - I tried BCM's panel and it works perfectly! -
Photoshop Layer Styles do not come over to FCP
I have a .psd file. It's a logo on one layer with a blank (alpha channel) as the background. I want to put a stroke on the logo. In photoshop, I use blending options to add my stroke.
When I import the file into FCP, it does not have the stroke. I tried other effects (drop shadow, bevel, etc) and none of those come over to FCP either.
So is it known that photoshop does not recognize the photoshop layer styles? Or am I doing something wrong?
Thanks for the help.
-CarlLayer - Rasterize is grayed out...
Wonder what I'm doing wrong...
Even if I can somehow do this, why can't FCP just understand these layer styles... It works so well with photoshop, but there's this one issue. And if I rasterize it, I'm not going to be able to make it bigger later. Kind of defeats the purpose of wanting to go back and edit it later on..
Strangeness... -
Drag & drop images from Finder into new Photoshop layer?
Is it possible to drag & drop images from Finder into a new Photoshop layer?
I can do it from a web browser, but not the Finder.>I couldn't find a way to do so in Bridge, but also I never use that program. Never got into Bridge's workflow. >
I really do suggest that you re-visit Bridge especially the CS4 version.
I just cannot conceive of trying to use a Digital camera, a Scanner or the Creative Suite programs without using Bridge and ACR.
I can even use it to read PDFs and inDesign documents (all pages!) without opening Acrobat or InD..
>I usually keep a "work" window open with all the files I am using for a project, so it would be far more handy to be able to skim them in the Finder.
It is now far more effective and efficient to do that in Bridge than in the Finder.
This is where you would find the new Collections feature to be invaluable:
Just select all the images and other files connected to a project from any folder and drag their icons into the same Collection.
You then have all aliases (previewable at full-screen slide-view size with one click of the space bar in CS4) to ALL of your files which are now visible in. and openable from, a single panel. -
How to find the frames-per-second of a Quicktime movie using Applescript?
Is there a way to find out the real-time "frames per second" of a Quicktime movie?
The only Applescript movie properties in Quicktime which I have found to be useful are "duration" and "time scale". The real-time duration of the movie in seconds is found by dividing "duration" by "time scale".
But "time scale" only sometimes relates to any real time property. In some cases it does (2500 = PAL 25 fps, 2997 = NTSC 29.97 fps) but for many other movie types I've opened (DivX, flv, mp4 etc) the "time scale" is often reported as "600" even though the Quicktime movie inspector window will report a frame rate of 25, 29.97, 15 or some other number.
Where does the Quicktime movie inspector window extract the FPS from, and is it possible to extract that same number, or calculate the real-time FPS of a Quicktime movie using Applescript only?
Thanks.Thanks for this but unfortunately it only works for some movie types. For .dv .flv and .divx movies, this script correctly calculates the FPS. But for .mpg .mp4 and .m4v it does not.
For .mpg movies I tested, the count of frames was always 1, so clearly the FPS calculation is always wrong.
For the .mp4 and .m4v movies I tried, the FPS was always reported as 43, regardless of whether the actual FPS was 25 or 29.97. In all cases the count of frames was incorrect.
A bug in Quicktime?
Maybe you are looking for
-
Pages Version 4.1 won't open on ipad 2.1-HELP???
I am a pastor and have just completed my sermon for our FIRST CHURCH SERVICE SUNDAY...I have e-mailed the document from my MacBook Pro with Pages 4.1 to my ipad which latest version is 2.0.1 Freaking out right now, I see no way out, can anyone help m
-
How to deploy web components in weblogic 8.1 !!
I have installed bea weblogic 8.1. But I am not getting a clear idea of deploying my webcomponents. Can anybody help me?? thanks in advance...
-
I just bought a new Mac mini and can't remember my password to get into the computer. Is there anyway I can unlock my computer without loosing all my files, especially all my photos?
-
Customer payment(f-28)
dear sap gurus, i am a sap sd consl, but one of my fi user is having a problem recieving the payt (f-28) that he wants bill number to be knocked off against which he is recieving the payment. because we are a automotive oem suppliers ,ou customers pa
-
Reading foxpro dbf files from forms6i
hi all, can anyone tell me how can i read a dbf file and access data from that. Thanks Uday