Files to layers array
I have 200 images that were retouched and sent out. Now I need to make the retoucehed a layer on top of the unretouched image on each one. Is there a way to script that?
What are their locations and what are the naming conventions?
Similar Messages
-
Photoshop CS3 shuts down after opening a PSD file with layers
Hello, I have met a problem with Photoshop CS3 (Windows XP SP2, no network printer) - after opening a PSD file with layers (saved with CS2) Photoshop shuts down. No error message.
Can some of you help me? (The only software that I have installed after Creative Suite CS3 is Corel X4. I have installed no upgrades of CS3.)> I have installed no upgrades of CS3
You should!
Even if it doesn't help here you should. -
Reading from file into an array
Hello, new to Java and we need to modify a mortgage calculator to read interest rate from a file into an array and not have them hard coded in the program. I have read many post on how to perform this but am lost on where to put the new code and format. Here is my code and I hope I posted this right.
import javax.swing.*; // Imports the Main Swing Package
import javax.swing.event.*;
import javax.swing.text.*; // Used for Text Box Caret Position
import java.awt.*; // Imports the main AWT Package
import java.awt.event.*; // Event handling class are defined here
import java.text.NumberFormat;
import java.text.*; // Imports the Main Text Package
import java.util.*; // Imports the Main Utility Package
public class mortgageCalculator1 extends JFrame implements ActionListener // Creates class mortgageCalculator
JLabel AmountLabel = new JLabel(" Enter Mortgage Amount:$ "); // Declares Mortgage Amount Label
JTextField mortgageAmount = new JTextField(10); // Declares Mortgage Amount Text Field
JButton IntandTerm1B = new JButton("7 years at 5.35%"); // Declares 1st Mortgage Term and Interest Rate
JButton IntandTerm2B = new JButton("15 years at 5.50%"); // Declares 2nd Mortgage Term and Interest Rate
JButton IntandTerm3B = new JButton("30 years at 5.75%"); // Declares 3rd Mortgage Term and Interest Rate
JLabel PaymentLabel = new JLabel(" Monthly Payment: "); // Declares Monthly Payment Label
JTextField monthlyPayment = new JTextField(10); // Declares Monthly Payment Text Field
JButton exitButton = new JButton("Exit"); // Declares Exit Button
JButton newcalcButton = new JButton("New Calculation"); // Declares New Calculation Button
JTextArea mortgageTable = new JTextArea(35,65); // Declares Mortgage Table Area
JScrollPane scroll = new JScrollPane(mortgageTable); // Declares ScrollPane and puts the Mortgage Table inside
public mortgageCalculator1() // Creates Method
super("MORTGAGE CALCULATOR"); // Title of Frame
JMenuBar mb = new JMenuBar(); // Cretes Menu Bar
JMenu fileMenu = new JMenu("File"); // Creates File Menu
fileMenu.setMnemonic('F'); // Enables alt + f to Access File Menu
JMenuItem exitItem = new JMenuItem("Exit"); // Creates Exit in File Menu
fileMenu.add(exitItem); // Adds Exit to File Menu
exitItem.addActionListener(new ActionListener() // Adds Action Listener to the Exit Item
public void actionPerformed(ActionEvent e) // Tests to Verify if File->Exit is Pressed
System.exit(0); // Exits the Programs when File->Exit is Pressed
mb.add(fileMenu); // Adds the File Menu
setJMenuBar(mb);
setSize(600, 400); // Sets Size of Frame
setLocation(200,200); // Sets the Location of the Window
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Command on how to close frame
JPanel pane = new JPanel(); // Declares the JPanel
pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS)); // Sets Panel Layout to BoxLayout
Container grid = getContentPane(); // Declares a Container called grid
grid.setLayout(new GridLayout(4,3,5,5)); // Sets grid Layout to GridLayout
pane.add(grid); // Adds the grid to the Panel
pane.add(scroll); // Addes the scrollPane to the Panel
grid.setBackground(Color.yellow); // Set grid color to Yellow
setCursor(new Cursor(Cursor.HAND_CURSOR)); // Makes the cursor look like a hand
mortgageAmount.setBackground(Color.black); // Sets mortgageAmount JPanel JTextField Background Color
mortgageAmount.setForeground(Color.white); // Sets mortgageAmount JPanel JTextField Foreground Color
mortgageAmount.setCaretColor(Color.white); // Sets mortgageAmount JPanel JTextField Caret Color
mortgageAmount.setFont(new Font("Lucida Sans Typewriter", Font.PLAIN, 18)); // Sets mortgageAmount JPanel JTextField Font
monthlyPayment.setBackground(Color.black); // Sets monthlyPayment JPanel JTextField Background Color
monthlyPayment.setForeground(Color.white); // Sets monthlyPayment JPanel JTextField Foreground Color
monthlyPayment.setFont(new Font("Lucida Sans Typewriter", Font.PLAIN, 18)); // Sets monthlyPayment JPanel JTextField Font
mortgageTable.setBackground(Color.yellow); // Sets mortgageTable JTextArea Background Color
mortgageTable.setForeground(Color.black); // Sets mortgageTable JTextArea Foreground Color
mortgageTable.setFont(new Font("Arial", Font.PLAIN, 18)); // Sets JTextArea Font
grid.add(AmountLabel); // Adds the Mortgage Amount Label
grid.add(mortgageAmount); // Adds the Mortgage Amount Text Field
grid.add(IntandTerm1B); // Adds 1st Loan and Rate Button
grid.add(PaymentLabel); // Adds the Payment Label
grid.add(monthlyPayment); // Adds the Monthly Payment Text Field
monthlyPayment.setEditable(false); // Disables editing in this Text Field
grid.add(IntandTerm2B); // Adds 2nd Loan and Rate Button
grid.add(exitButton);
grid.add(newcalcButton); // Adds the New Calc Button
grid.add(IntandTerm3B); // Adds the Exit Button
setContentPane(pane); // Enables the Content Pane
setVisible(true); // Sets JPanel to be Visable
exitButton.addActionListener(this); // Adds Action Listener to the Exit Button
newcalcButton.addActionListener(this); // Adds Action Listener to the New Calc Button
IntandTerm1B.addActionListener(this); // Adds Action Listener to the 1st loan Button
IntandTerm2B.addActionListener(this); // Adds Action Listener to the 2nd loan Button
IntandTerm3B.addActionListener(this); // Adds Action Listener to the 3rd loan Button
mortgageAmount.addActionListener(this); // Adds Action Listener to the Mortgage Amount Text Field
monthlyPayment.addActionListener(this); // Adds Action Listener to the Monthly payment Text Field
public void actionPerformed(ActionEvent e) // Tests to Verify Which Button is Pressed
Object command = e.getSource(); // Enables command to get data
if (command == exitButton) //sets exitButton // Activates the Exit Button
System.exit(0); // Exits from exit button // Exits from exit button
int loanTerm = 0; // Declares loanTerm
if (command == IntandTerm1B) // Activates the 1st Loan Button
loanTerm = 0; // Sets 1st value of Array
if (command == IntandTerm2B) // Activates the 2nd Loan Button
loanTerm = 1; // Sets 2nd value of Array
if (command == IntandTerm3B) // Activates the 3rd Loan Button
loanTerm = 2; // Sets 3rd value of Array
double mortgage = 0; // Declares and Initializes mortgage
double rate = 0; // Declares and Initializes rate
double [][] loans = {{7, 5.35}, {15, 5.50}, {30, 5.75},}; // Array Data for Calculation
try
mortgage = Double.parseDouble(mortgageAmount.getText()); // Gets user input from mortgageAmount Text Field
catch (NumberFormatException nfe) // Checks for correct number fformatting of user input
JOptionPane.showMessageDialog (this, "Error! Invalid input!"); // Outputs error if number is wrong format or nothing is entered
return;
double interestRate = loans [loanTerm][1]; // Sets interestRate amount
double intRate = (interestRate / 100) / 12; // Calculates Interst Rate
double loanTermMonths = loans [loanTerm] [0]; // Calculates Loan Term in Months
int months = (int)loanTermMonths * 12; // Converts Loan Term to Months
double interestRateMonthly = (intRate / 12); // monthly interst rate
double payment = mortgage * intRate / (1 - (Math.pow(1/(1 + intRate), months))); // Calculation for Monthly payment
double remainingLoanBalance = mortgage; // Sets Reamaining Balance
double monthlyPaymentInterest = 0; // holds current interest payment
double monthlyPaymentPrincipal = 0; // holds current principal payment
NumberFormat myCurrencyFormatter = NumberFormat.getCurrencyInstance(Locale.US); // Number formatter to format output in table
monthlyPayment.setText(myCurrencyFormatter.format(payment));
mortgageTable.setText("Month\tPrincipal\tInterest\tEnding Balance\n" + // Formats morgageTable Header
"---------\t----------\t------------\t---------------------\n");
for (;months > 0 ; months -- )
monthlyPaymentInterest = (remainingLoanBalance * intRate); // Calculation for Monthly Payment Toward Interest
//Calculate H = R x I
monthlyPaymentPrincipal = (payment - monthlyPaymentInterest); // Calculation for Monthly Payment Toward Principal
//Calculate C = P - H
remainingLoanBalance = (remainingLoanBalance - monthlyPaymentPrincipal); // Calculation for Reamining loan Balance
// Calculate R = R - C
// H = monthlyPaymentInterest
// R = remainingLoanBalance
// P = payment
// C = monthlyPaymentPrincipal
// I = interestRateMonthly
mortgageTable.setCaret (new DefaultCaret()); // Sets Scroll position to the top left corner
mortgageTable.append(String.valueOf(months) + "\t" + // Pulls in data and formats MortgageTable
myCurrencyFormatter.format(monthlyPaymentPrincipal) + "\t" +
myCurrencyFormatter.format(monthlyPaymentInterest) + "\t" +
myCurrencyFormatter.format(remainingLoanBalance) + "\n");
if(command == newcalcButton) // Activates the new calculation Button
mortgageAmount.setText(null); //clears mortgage amount fields
monthlyPayment.setText(null); //clears monthly payment fields
mortgageTable.setText(null); //clears mortgage table
public static void main(String[] args) //This is the signature of the entry point of all the desktop apps
new mortgageCalculator1();
}OK, making a little progress but am still very confused.
What I have is a file (int&term.dat) with three lines;
5.75, 30
5.5, 15
5.35 ,7
I have three JButtom that I what to read a seperate line and place the term in a term TextField and a rate in a Rate TextField
I have added the following code and all it does now is output a black space to the screen; I am working with one Button and Just the rate for now to try and get it to work. I have been looking at the forums, reading the internet and several books to try and figure this out. I think I may be getting closer.
public static void read()
String line;
StringTokenizer tokenizer;
String rate;
String term;
try
FileReader fr = new FileReader ("int&term.dat");
BufferedReader inFile = new BufferedReader (fr);
line = inFile.readLine();
while (line != null)
tokenizer = new StringTokenizer(line);
rate = tokenizer.nextToken();
line = inFile.readLine();
inFile.close();
System.out.println(new String());
catch (FileNotFoundException exception)
System.out.println ("The file was not found.");
catch (IOException exception)
System.out.println (exception);
} -
Assigning Values from a file to an Array
hey everyone I am working on a program that inputs values from a text file into an array i got the first array to work but the second array does not work. Please if you have a moment lend a hand. Here is my code. the program compiles fine but will not run right with the second array in it. The second array is called "B"
import java.util.*;
import java.io.*;
import javax.swing.*;
class algorithmAssignment1{
public static void main (String[] args)throws IOException{
int mark, counter, arrayAsize, mark2;
counter=0;
arrayAsize=100;
int [] A= new int[arrayAsize];
int [] B= new int[arrayAsize];
String fileName = "arraynumbersa.txt";
String value,value2;
BufferedReader input;
input = new BufferedReader (new FileReader (fileName));
value = input.readLine ();
while (value != null){
mark = Integer.parseInt (value);
A[counter]=mark;
counter=counter+1;
value = input.readLine ();
/* String fileName2 = "arraynumbersb.txt";
BufferedReader input2;
input2 = new BufferedReader (new FileReader (fileName2));
value2 = input2.readLine ();
while (value2 != null){
mark2 = Integer.parseInt (value2);
B[counter]=mark2;
counter=counter+1;
value2 = input2.readLine ();
bubbleSort(A,A.length);
bubbleSort(B,B.length);
System.out.println("Here is list A");
for (int i = 0; i < A.length; i++){
System.out.println( A[i] );
System.out.println();
System.out.println("Here is list B");
for (int i=0;i<B.length;i++){
System.out.println(B);
/*change
for (int i=0;i<A.length;i++){
for (int j=0;j<B.length;j++){
if (A[i]==B[j]){
System.out.println("Numbers that are in list A and B are "+ B[j]);
static void bubbleSort(int numbers[], int array_size){
int i, j, temp;
for (i = (array_size - 1); i >= 0; i--)
for (j = 1; j <= i; j++)
if (numbers[j-1] > numbers[j]){
temp = numbers[j-1];
numbers[j-1] = numbers[j];
numbers[j] = temp;Ok new problem now. I have to get the duplicates to go into a new array in order to display the duplicates. I can't figure out why it just lists the one duplicate but not the others.(It lists the final duplicate)
Here is my code:
import java.util.*;
import java.io.*;
import javax.swing.*;
class algorithmAssignment1{
public static void main (String[] args)throws IOException{
int mark, counter, arrayAsize, mark2,counter2;
counter=0;
arrayAsize=100;
counter2=0;
int [] A= new int[arrayAsize];
int [] B= new int[arrayAsize];
int [] C=new int [arrayAsize];
String fileName = "arraynumbersa.txt";
String value,value2;
BufferedReader input;
input = new BufferedReader (new FileReader (fileName));
value = input.readLine ();
while (value != null){
mark = Integer.parseInt (value);
A[counter]=mark;
counter=counter+1;
value = input.readLine ();
String fileName2 = "arraynumbersb.txt";
BufferedReader input2;
input2 = new BufferedReader (new FileReader (fileName2));
value2 = input2.readLine ();
while (value2 != null){
mark2 = Integer.parseInt (value2);
B[counter2]=mark2;
counter2=counter2+1;
value2 = input2.readLine ();
bubbleSort(A,A.length);
bubbleSort(B,B.length);
System.out.println("Here is list A");
for (int i = 0; i < A.length; i++){
System.out.println( A[i] );
System.out.println();
System.out.println("Here is list B");
for (int i=0;i<B.length;i++){
System.out.println(B);
for (int i=0;i<A.length;i++){
for (int j=0;j<B.length;j++){
if (A[i]==B[j]){
for (int k=0;k<C.length;k++){
C[k]=(B[j]);
System.out.println("Here"+B[j]);
System.out.println("Here are A and B");
for (int i=0;i<C.length;i++){
System.out.println(C[i]);
static void bubbleSort(int numbers[], int array_size){
int i, j, temp;
for (i = (array_size - 1); i >= 0; i--)
for (j = 1; j <= i; j++)
if (numbers[j-1] > numbers[j]){
temp = numbers[j-1];
numbers[j-1] = numbers[j];
numbers[j] = temp; -
Reading one line from a text file into an array
i want to read one line from a text file into an array, and then the next line into a different array. both arays are type string...i have this:
public static void readAndProcessData(FileInputStream stream){
InputStreamReader iStrReader = new InputStreamReader (stream);
BufferedReader reader = new BufferedReader (iStrReader);
String line = "";
try{
int i = 0;
while (line != null){
names[i] = reader.readLine();
score[i] = reader.readLine();
line = reader.readLine();
i++;
}catch (IOException e){
System.out.println("Error in file access");
this section calls it:
try{
FileInputStream stream = new FileInputStream("ISU.txt");
HighScore.readAndProcessData(stream);
stream.close();
names = HighScore.getNames();
scores = HighScore.getScores();
}catch(IOException e){
System.out.println("Error in accessing file." + e.toString());
it gives me an array index out of bounds erroroh wait I see it when I looked at the original quote.
They array you made called names or the other one is prob too small for the amount of names that you have in the file. Hence as I increases it eventually goes out of bounds of the array so you should probably resize the array if that happens. -
Data from a file to an array and opposite
Aloha! Hope you can help me on this one!
I need to read from a text (sequencial) file into an array, work on it and then save it to the origin file. How do I do this? I can only get examples of string->file file->string
Thanx in advance! :))Hum...what I need to do is take one file and read some of it's lines into the first position of the array; and so on for the next positions. Here are the first 2 sets of lines of the file:
They represent students, wich I need to load into a CardType type array:
11
Albert Einstein
100
2
B
234
120
45
2002 11 18 //date
8 0 0 //time
2002 11 15 //date
16 20 0 //time
Stephen Jay Gould
235
3
A
512
100
50
2002 11 18 //date
8 20 0 //time
2002 11 18 //date
12 30 0 //time -
Hello, I use photoshop cc 10 days and I did a lot of files with layers and channels.
For two days in two different locations that only happens in some documents when you reopen the job done no more .. Example 6 channels on the facts I see only one ..
Thank you for your attention.
AnnalisaDon't understand what you writing here. Screen shoots would be most helpful.
Supply pertinent information for quicker answers
The more information you supply about your situation, the better equipped other community members will be to answer. Consider including the following in your question:
Adobe product and version number
Operating system and version number
The full text of any error message(s)
What you were doing when the problem occurred
Screenshots of the problem
Computer hardware, such as CPU; GPU; amount of RAM; etc. -
No option to Load Files into Layers into Photoshop
In CS6 I don't have a menu option to load files into layers. Did they get rid if it?
No, it still works and is also present in CC. I assume you have used menu Tools / Photoshop / Load in to layers for this?
Is Photoshop present under menu Tools? if not check Bridge preferences Start Up scripts and see if a check mark is set in front of Photoshop
Or reset Bridge preferences by holding down option key (Mac) or control key (Win) while restarting Bridge and choose reset prefs. -
Converting a text file into an array
import java.io.*;
public class Copy {
public static void main(String[] args) throws IOException {
File inputFile = new File("farrago.txt");
File outputFile = new File("outagain.txt");
FileReader in = new FileReader(inputFile);
FileWriter out = new FileWriter(outputFile);
int c;
while ((c = in.read()) != -1)
out.write(c);
in.close();
out.close();
i have been working my way through the online tutorials and have found them very helpful, i have looked at array and would like to know how to convert data from a text file inot an array? using the above example how would i go about doing this?You'd use the readLine () method:BufferedReader reader = new BufferedReader (new FileReader (file));
String line;
List list = new LinkedList ();
while ((line = reader.readLine ()) != null) {
list.add (line);
// don't know why you'd want this, but anyway
String[] lines = (String[]) list.toArray (new String[list.size ()]);Kind regards,
Levi -
Obtain Array from an XML file with Multiple Arrays
Hi,
So I have been struggling with this program I am making for the last few months but I am almost there. I have a program that creates multiple arrays and place them one after another in an xml file and each array has its own unique name. Now I would like to create a VI that takes this XML file and when the user inputs the specific array name they are looking for it goes into the xml file finds the entire array under that name and displays it in an output indictor to be viewed on the VI. Attached is a sample of my xml file and the VI that creates this xml file.
Thanks,
dlovell
Solved!
Go to Solution.
Attachments:
I_Win.zip 20 KBHere is a slightly different version. The one above reads from a file. This is how you would read from an already loaded XML string.
=====================
LabVIEW 2012
Attachments:
Find Array.vi 18 KB -
Laoding files into layers from bridge does not work
Using photoshop ver 14.2.1x64 and bridge on a PC.. While in Bridge, I selected 2 pictures, selected tools, photoshop and load files into layers. It does not work. any ideas of how to make it work
You get 5 gold stars, I also have cc2014 and it works, thank you.
On Wed, Oct 29, 2014 at 4:56 PM, Warunicorn <[email protected]> -
How can I open a psd file with layers in touch?
I want to edit a psd file with layers in photoshop touch. Is this possible?
No. (Kind of, sort of.) You can export PS Touch projects for import into desktop Photoshop and have the layers intact for further editing but you cannot do the reverse; any imported PSD will be automatically flattened. (I'm guessing this was done to prevent crashing. PS Touch supports 12 layers max vs. the potential thousands available in desktop Photoshop.)
-
Photoshop CS5 Extended won't covert mp4 files to layers?
I recently downloaded cs5 and it won't download .mp4 files to layers. whenever i go to file > import > video frames to layers, the mp4 files are greyed out and i can only click on .avi files.
there is no high quality converter from mp4 to avi, so it's quite frustrating.
any ideas about what may be wrong?
thanks,
catherine.Hi Catherine
Try importing it as a layer inside an already open file:
Layer > Video Layers > New Video Layer From File
If that still doesn't work, try:
File>Place
but it will be opened as a smart object
Some links that you might find helpful:
http://help.adobe.com/en_US/photoshop/cs/using/WS38EADB62-E9AE-406f-90 E2-8243DD303DF1a.html#WS4C0CEAB8-0B2C-4ece-B66E-0B198AF04404a
http://help.adobe.com/en_US/photoshop/cs/using/WSC79F5E60-3E9B-44e3-8D DF-0FF1144F5711a.html -
Unable to open files as layers.
I just bought Lightroom 5. I have been unable to export files as layers into Photoshop CS4, no matter what.
I just wonder why. Could anybody help me with this?
William Rodriguez
Miami, Florida.These options all require corresponding Lightroom/ACR versions:
The reason is that they are all Photoshop scripts called from Lightroom, but (silently) rendered by ACR into Photoshop. So you need an ACR version that reads all the Lightroom settings. ACR 5.x, which is what you have in CS4, is way behind.
The Photoshop script in question here is "Load Files into Stack". So the workaround is to export from Lightroom, and stack them in Photoshop. Just an added step. -
Export as a Photoshop file, write layers unavailable
Hello all,
I am new on this board, I did some research and couldn't find an answer to my problem. I hope you'll be able to help me !
I am used to work and design my projects with Illustrator CS4 and then to click on File >> Export >> Photoshop file >> Check the Write Layers options >> OK.
I don't know what I did with one of my file, but suddenly I can't check the option "Write Layers" whereas it worked fine few days ago...
I tried with other files I have and it works fine... but not with this new one...
Do you have any idea of what I did?
This file has 66 layers, and there are no nested groups (I read online that it could be the problem but it's not)...
I tried to remove all the layers except one and I still have this problem, I can only export it as a flat image...
Thanks for your help! I really need to export it as a photoshop file with layers.
LaurentI double check and my document is RGB and I want to export to RGB, so this is not the issue.
I really don't know what it could be
I attached an illustrator file I created using the one I am having a problem with. This is just an ellipse and a rectangle. I can't export it to a Photoshop file with the Write Layers option checked... any idea?
Maybe you are looking for
-
QT Version 7.1.5.58 ?
Hello to All: After a previous ordeal upgrading to updated vertion of Itunes few month back Before 7.1 I decided to upgrade to this one.. Big mistake (If aint broke why fix). Did not listened to that one again.. Ok Now I can get iTunes, back the way
-
My MacBook Pro (early 2011) will not go to sleep
Very recently my MacBook Pro (early 2011) suddenly stopped going to sleep whenever I shut it or even when I manually put it to sleep. I went to my schools help desk and they suggested restoring the computer to factory settings. I did this, reinstalle
-
Naming Problems with EJB when accessing from WebApplication
Hi all, I'm trying to deploy an application consisting of several stateless session beans, one message driven bean and a web application. Everything works fine, until I try to log in (webapp). Then I get the following error: com.sap.engine.services.j
-
MISSING VOLUME SLIDER BAR SOLVED!!!
I have found the culprit! It has taken me a very long time to figure it out what it was but it has finally been found. The volume slider disappears when playing music or watching videos but otherwise works. The problem is the 32pin connector. If you
-
I believe that SM documents business processes in the Business Process Repository while there is also the Enterprise Services Repository. Is there a link between the two? For using CE to orchestrate new business processes, I suspect it needs the busi