Can an action set the dimension of the crop and put in the center of the image?
Hi
running cs6 64bit under w7 64bit
can an action set the dimensions of the crop height & length and put the crop in the center of the image?
or should i need a script?
i mean for example i taken many photos about 20mp mega pixel
i would like to run a script or an action that set the height & length and set the crop in the center of the image
thanks
mantralightroom wrote:
i have cs6 but i haven't in the action option conditional actions
ps i tried to record a script to set the histogram channel RGB or Luminocity , but the script plugin doesn't record it and even the action can do it
you know cs6 starts with histogram in colors mode
I have a hard time with English even though it may native language. I'm having some problem with what you wrote.
Yes cs6 does not have what Adobe calls conditional actions they put into CC. That feature more or less an IF statement condition on some document attributes. Like if document width is greater then document height play action landscape else play action portrait. With CS6 you need to write one line script to use in actions. Most of the utility scripts I wrote for use in actions are more complex then a simple if statement.
The way you record scripts is PS is be using Adobe Scriptlistener Plug-in when installed the plug-in records everything you do that can be recorded into two log files one in JavaScript and the other in VBS. The code generated works by passing parameters to Adobe Photoshop's Action Manager. To make scripts toy need to extract the steps you need from one of the log files. However some thing you can do in Photoshop can not be recorded. And while your right that the scriptlistener plug-in does not record anything for setting the histograms to RGB channel or Luminosity channel your wrong when you write the Action Recorder can do it.
However scripts can get the histograms channel data. I have never process a histogram in a script however there is a sample Photoshop Histogram in the Photoshop javascripting guide. That creates a text graph log.
// Function to activate all the channels according to the documents mode
// Takes a document reference for input
function TurnOnDocumentHistogramChannels(inDocument) {
// see how many channels we need to activate
var visibleChannelCount = 0
// based on the mode of the document
switch (inDocument.mode) {
case DocumentMode.BITMAP:
case DocumentMode.GRAYSCALE:
case DocumentMode.INDEXEDCOLOR:
visibleChannelCount = 1
break;
case DocumentMode.DUOTONE:
visibleChannelCount = 2
break;
case DocumentMode.RGB:
case DocumentMode.LAB:
visibleChannelCount = 3
break;
case DocumentMode.CMYK:
visibleChannelCount = 4
break;
case DocumentMode.MULTICHANNEL:
default:
visibleChannelCount = inDocument.channels.length + 1
break;
// now get the channels to activate into a local array
var aChannelArray = new Array()
// index for the active channels array
var aChannelIndex = 0
for(var channelIndex = 0; channelIndex < inDocument.channels.length;channelIndex++) {
if (channelIndex < visibleChannelCount) { aChannelArray[aChannelIndex++] = inDocument.channels[channelIndex] }
// now activate them
inDocument.activeChannels = aChannelArray
// Save the current preferences
var startRulerUnits = app.preferences.rulerUnits
var startTypeUnits = app.preferences.typeUnits
var startDisplayDialogs = app.displayDialogs
// Set Adobe Photoshop CC to use pixels and display no dialogs
app.preferences.rulerUnits = Units.PIXELS
app.preferences.typeUnits = TypeUnits.PIXELS
app.displayDialogs = DialogModes.NO
// if there are no documents open then try to open a sample file
if (app.documents.length == 0) { open(File(app.path + "/Samples/Fish.psd")) }
// get a reference to the working document
var docRef = app.activeDocument
// create the output file
// first figure out which kind of line feeds we need
if ($.os.search(/windows/i) != -1) {fileLineFeed = "Windows" }
else { fileLineFeed = "Macintosh"}
// create the output file accordingly
fileOut = new File("~/Desktop/Histogram.log")
fileOut.lineFeed = fileLineFeed
fileOut.open("w", "TEXT", "????")
// write out a header
fileOut.write("Histogram report for " + docRef.name)
// find out how many pixels I have
var totalCount = docRef.width.value * docRef.height.value
// more info to the out file
fileOut.write(" with a total pixel count of " + totalCount + "\n")
// channel indexer
var channelIndex = 0
// remember which channels are currently active
var myActiveChannels = app.activeDocument.activeChannels
// document histogram only works in these modes
if (docRef.mode == DocumentMode.RGB ||docRef.mode == DocumentMode.INDEXEDCOLOR ||docRef.mode == DocumentMode.CMYK) {
// activate the main channels so we can get the documents histogram
TurnOnDocumentHistogramChannels(docRef)
// Output the documents histogram
OutputHistogram(docRef.histogram, "Luminosity", fileOut)
// local reference to work from
var myChannels = docRef.channels
// loop through each channel and output the histogram
for (var channelIndex = 0; channelIndex < myChannels.length; channelIndex++) {
// the channel has to be visible to get a histogram
myChannels[channelIndex].visible= true
// turn off all the other channels
for (var secondaryIndex = 0; secondaryIndex < myChannels.length;secondaryIndex++) {
if (channelIndex != secondaryIndex) { myChannels[secondaryIndex].visible= false }
// Use the function to dump the histogram
OutputHistogram(myChannels[channelIndex].histogram,myChannels[channelIndex].name, fileOut)
// close down the output file
fileOut.close()
alert("Histogram file saved to: " + fileOut.fsName)
// reset the active channels
docRef.activeChannels = myActiveChannels
// Reset the application preferences
app.preferences.rulerUnits = startRulerUnits
app.preferences.typeUnits = startTypeUnits
app.displayDialogs = startDisplayDialogs
// Utility function that takes a histogram and name
// and dumps to the output file
function OutputHistogram(inHistogram, inHistogramName, inOutFile) {
// find ouch which count has the largest number
// I scale everything to this number for the output
var largestCount = 0
// a simple indexer I can reuse
var histogramIndex = 0
// see how many samples we have total
var histogramCount = 0
// search through all and find the largest single item
for (histogramIndex = 0; histogramIndex < inHistogram.length;histogramIndex++) {
histogramCount += inHistogram[histogramIndex]
if (inHistogram[histogramIndex] > largestCount)
largestCount = inHistogram[histogramIndex]
// These should match
if (histogramCount != totalCount) {
alert("Something bad is happening!")
// see how much each "X" is going to count as
var pixelsPerX = largestCount / 100
// output this data to the file
inOutFile.write("One X = " + pixelsPerX + " pixels.\n")
// output the name of this histogram
inOutFile.write(inHistogramName + "\n")
// loop through all the items and output in the following format
// 001
// 002
for (histogramIndex = 0; histogramIndex < inHistogram.length;histogramIndex++) {
// I need an extra "0" for this line item to keep everything in line
if (histogramIndex < 10)
inOutFile.write("0")
// I need an extra "0" for this line item to keep everything in line
if (histogramIndex < 100)
inOutFile.write("0")
// output the index to file
inOutFile.write(histogramIndex)
// some spacing to make it look nice
inOutFile.write(" ")
// figure out how many X’s I need
var outputX = inHistogram[histogramIndex] / largestCount * 100
// output the X’s
for (var a = 0; a < outputX; a++)
inOutFile.write("X")
inOutFile.write("\n")
inOutFile.write("\n")
Similar Messages
-
I really feel stupid for doing that i just want to know why i can connect to wifi at places like target best buy and malls but not at home, i reset my router and my phone network settings and nothing is working. So please tell me whats wrong with it and how i can fix this problem please
braxtonshae wrote:
I really feel stupid for doing that i just want to know why i can connect to wifi at places like target best buy and malls but not at home, i reset my router and my phone network settings and nothing is working. So please tell me whats wrong with it and how i can fix this problem please
What's wrong with it? You put METAL into a MICROWAVE. Where did you see this 'iOS Wave' feature? Was it on the Apple website? Nope.
Unless you're simply trolling (which is the most likely case), you need to go to an Apple store and hope they don't classify it as Beyond Economical Repair. -
Can iTunes be set to play only one song and then stop when the song is finished and not go on to play another unless commanded?
If you uncheck all of the songs, they will only play if explicitly commanded. Command-click in a checkbox and they will all be unchecked. Command-clicking again will check the all again should you want to do that.
-
Hi, I would like to know how can i break the value for a row and column once i have converted the image to the array. I wanted to make some modification on the element of the array at a certain position. how can i do that?
At the moment (as per attachhment), the value of the new row and column will be inserted by the user. But now, I want to do some coding that will automatically insert the new value of the row and the column ( I will use the formula node for the programming). But the question now, I don't know how to split the row and the column. Is it the value of i in the 'for loop'? I've tried to link the 'i' to the input of the 'replace subset array icon' , but i'm unable to do it as i got some error.
Please help me!
For your information, I'm using LABView 7.0.Hi,
Thanks for your reply.Sorry for the confusion.
I manage to change the array element by changing the row and column value. But, what i want is to allow the program to change the array element at a specified row and column value, where the new value is generated automatically by the program.
Atatched is the diagram. I've detailed out the program . you may refer to the comments in the formula node. There are 2 arrays going into the loop. If a >3, then the program will switch to b, where if b =0, then the program will check on the value of the next element which is in the same row with b but in the next column. But if b =45, another set of checking will be done at a dufferent value of row and column.
I hope that I have made the problem clear. Sorry if it is still confusing.
Hope you can help me. Thank you!!!!
Attachments:
arrayrowncolumn2.JPG 64 KB -
I use aperture 3 since a long time. Using slit viewer, noe the bigger image become bigger then the given space and shifted to the right, so that I can't see the complete picture anymore. And I also don't see the last few picture in the strip below. How can I splve this problem?
This lloks like your preferences file might have become corrupted.
you probably have a problem with corrupted user preferences.
Remove the Preferences: Remove the Aperture's user preferences from the User Library as described here:
Aperture 3: Troubleshooting Basics http://support.apple.com/kb/HT3805
Note:Your User Library is hidden by default in 10.7.x or later - to open it in a Finder window use the "Go" menu from the Finder's main menu bar.
Quit Aperture, if it is running. Log off and on again.
Open the user library by using the Finder's "Go > Go to Folder" menu and hold down the options-key, until "Library" appears in the drop down menu. Select it.
In the widow that will open, scroll down to "Preferences"
From the "Preferences" folder remove "com.apple.Aperture.plist".
Then try to launch Aperture again.
But deleting the "Preferences" file will cause Aperture to forget the preferences settings. Be prepared to have to reset all options you set using the Aperture Preferences panel.
Regards
Léonie -
I wanted to login to iCloud from my ipad to view my calendar. The message was that I needed to set up iCloud on the device but I have and it won't give me the login screen. What am I missing? Thank you.
I'm assuming you are trying to log in using Safari on your ipad - if this is the case, you can't do that on an iOS device. You must use the Calendar app on the device. If you are using someone else's device, then you have a problem doing this. I just tried using Chrome on an iPad and that also doesn't work. If there's on nearby, use a computer's browser, that works.
-
I bought iPad and I can not access, A message appears asking me account and password when i return to the person who I purchased it from him, he told me that he forgot the account and password
I want a solution to the problem, because in this way I will not benefit from the iPadThere is no solution. You have to provide the ID and password. There is no way around it. If the person you bought it from can't provide it, return it and get your money back.
-
When I plug in iPhone (5.1.1) to computer, playlists show up on the iPhone (when plugged in), that do not appear when it is not plugged in. And I can't erase them. I have iTunes match, and deleted all my music on the iPhone, but that had no effect on the phantom playlist that shows up on the PC when I plug in the iPhone to the PC. I cannot manually move songs or playlists from the PC to the iPhone
Help greatly appreciated.Unplug your Iphone out of your computer and replug it back in. It took me several times before I could do this
-
My setup: iMac hardline to Canon i960 printer. Issue: endless printing of the same document. The printer window states that the pinter is in use and there is nothing listed in the Print Queue. How can I stop printing the document?
Soution: Delete the printer and add the same printer back in, therefore creating a new print queue.
-
How can I sync my calendars on the MacBook Pro, iCloud, iPad and iPhone? Since upgrading to the newest OS on each device, none of the calendars sync. Any suggestions?
Hi silverk,
Welcome to the Apple Support Communities!
I understand the need for all of your calendars to be up to date across all of your devices and how frustrating it can be when they are not syncing as you would expect. In this situation I would suggest reading over and using the attached article for troubleshooting.
iCloud: Troubleshooting iCloud Calendar
Have a great day,
Joe -
I had completed my iDVD project, a Wedding Slideshow with pictures and music, and burned it on a disc. It worked great! Then someone messed with the original project on my computer and clicked around and put a red frame around the opening screen that has the Wedding theme with music. Now when I burn the project to make more DVDs, it burns but no longer has the opening frame. It immediately opens to the iMovie slideshow. How can I fix so I can burn the entire project with opening frames?
As Bengt suggested make a disk image of the successfully burned DVD using Disk Utility. Then you can burn copies any time you need one.
In the future once you have the project as you want it save it as a disk image via the File ➙ Save as Disk Image menu option. This will separate the encoding process from the burn process.
To check the encoding mount the disk image and launch DVD Player and play it. If it plays OK with DVD Player the encoding was good.
You can then burn it to disk with Disk Utility at the slowest speed available to assure the best burn quality. Always use top quality media: Verbatium, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
OT -
After updating to 8.1.2 my iPad continues to restart. I tried resetting all the settings and this didn't work. I tried rebooting by holding the start button & power button and it didnt work either. The problem has actually worsened. I can no longer use my iPad.
You need to restore the iPad.
Use iTunes to restore your iOS device to factory settings - Apple Support
If that will not work, you will need to use Recovery Mode to restore.
If you can't update or restore your iPhone, iPad, or iPod touch - Apple Support -
I preordered One Direction's new album Midnight Memories, but did not purchase it. It is not in my downloads or purchases even though it says it's purchased. I can't even buy it because it says purchased and will not let me click the button. Please help!
Try:
HT2519 Pre-ordered album, it says...: Apple Support Communities -
I need to get photos off a water damaged iPhone 3GS. It spent time underwater, saltwater. I let it dry for a week, turned it on, the apple symbol came on, then it died. I need to retrieve my photos off it. Can I take out the component that has the photos (is this the main board?) and put it into another of the same phone to retrieve the photos? Please help
You're talking about the logic board. The two most likely things to get toasted, with water damage, are the battery(it shorts out), & the logic board. The worst water damage would be salt water. I'm afraid your logic board is toast.
-
I have photos on my iphone 4 that i'm trying to transfer to iphoto. The problem is when I plug the phone in, it only wants to transfer the new photos, not all. How can I take all the photos off my phone and put them into iphoto? Even if there are duplicates, I'd like to make sure I get all the photos from my phone into iphoto. Thanks
To see all the photos on the phone, including photos that have already been imported into iPhoto, deselect the "Hide Photos Already Imported" checkbox. If the camera contains photos that have already been imported into iPhoto, those photos are hidden by default.
Maybe you are looking for
-
Hello Experts, I have a FI document ( Dr GR/IR Account, Cr Vendor Account) and i need to find out the Vendor Invoice Number ( or MM document) from this one. How do i find out? I am guessing that if i find the GR document ( Dr Inventory, Cr GR/IR docu
-
Lenovo g550 cursor moving Please help
Im struggling on here really....lol.... Im having trouble with my G550.......when im typing ....if im not watching the screen when typing, I find the cursor has moved into the middle of another word after pressing the space bar......also, after press
-
Weblogic 7 can support jsf? i come from china
I was small to try once, seeming not to go. If I want to use weblogic not 7 do jsf how to do, isn't a ducting what jar wrap all right Have the solution none
-
Migration Assistant not working with OS X Lion via Wireless Network?
Anybody know how to assist me here? Basically, I have two iMacs on seperate floors of my home. They are newer models (both purchased last year) and I have upgraded both of them to Lion and just ran a system update on both of them to ensure they are
-
Will there be a patch beta?
I, like many, have experienced the iTunes 5 services related problem. Is sounds as if Apple is working to correct this problem with a patch My question is - Does Apple run a (closed or open) Beta for their patches and product revs? I have found runni