CODE: A simple desktop color sampler and JColorChooser Panel based on it.

// ColorSamplerColorChooserPanel.java
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import javax.swing.Icon;
import javax.swing.JColorChooser;
import javax.swing.JFrame;
import javax.swing.UIManager;
import javax.swing.colorchooser.AbstractColorChooserPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
* A simple ColorChooserPanel for JColorChooser based on ColorSampler.
* @author Sandip V. Chitale
* @version 1.0
* @see ColorSampler
public class ColorSamplerColorChooserPanel
     extends AbstractColorChooserPanel
     implements ChangeListener
     private boolean isAdjusting = false;
     private ColorSampler colorSampler;
     public ColorSamplerColorChooserPanel() {
          colorSampler = new ColorSampler();
          colorSampler.addChangeListener(this);
     public void stateChanged(ChangeEvent ce) {
          getColorSelectionModel().
          setSelectedColor(colorSampler.getSelectedColor());
     // Implementation of AbstractColorChooserPanel
     * Return display name.
     * @return a <code>String</code> value
     public String getDisplayName() {
          return "Color Sampler";
     * Update the chooser.
     public void updateChooser() {
if (!isAdjusting) {
isAdjusting = true;
               colorSampler.
               showColor(getColorSelectionModel().getSelectedColor(), false);
isAdjusting = false;
     * Build the chooser panel.
     public void buildChooser() {
          setLayout(new BorderLayout());
          add(colorSampler, BorderLayout.NORTH);
     * Return small icon.
     * @return an <code>Icon</code> value
     public Icon getSmallDisplayIcon() {
          return null;
     * Return large icon.
     * @return an <code>Icon</code> value
     public Icon getLargeDisplayIcon() {
          return null;
     * Return font.
     * @return a <code>Font</code> value
     public Font getFont() {
          return null;
     * <code>ColorSampler</code> test.
     * @param args a <code>String[]</code> value
     public static void main(String[] args) {
          try {
               UIManager.
               setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
          } catch (Exception e) {
          final JFrame frame = new JFrame("Color Sampler Color Chooser");
          JColorChooser colorChooser = new JColorChooser();
          colorChooser.addChooserPanel(new ColorSamplerColorChooserPanel());
          frame.setContentPane(colorChooser);
          frame.pack();
          frame.setVisible(true);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// ColorSampler.java
import java.awt.AWTException;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.Font;
import java.awt.Point;
import java.awt.Robot;
import java.awt.Toolkit;
import java.awt.datatransfer.StringSelection;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionAdapter;
import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.SwingUtilities;
import javax.swing.BoxLayout;
import javax.swing.event.ChangeEvent;
import javax.swing.event.EventListenerList;
import javax.swing.event.ChangeListener;
* A simple desktop color sampler. Drag mouse from the color sample
* label and release mouse anywhere on desktop to sample color at that
* point. The hex string for the color is also copied to the system
* clipboard.
* Note: Uses java.awt.Robot.
* @author Sandip V. Chitale
* @version 1.0
public class ColorSampler extends JPanel {
     private JLabel sampleColorLabel;
     private JLabel colorLabel;
     private JTextField colorValueField;
     private Robot robot;
     * Creates a new <code>ColorSampler</code> instance.
     public ColorSampler() {
          setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
          setBorder(BorderFactory.createEtchedBorder());
          Font font = new Font("Monospaced", Font.PLAIN, 11);
          sampleColorLabel = //new JLabel(new ImageIcon(getClass().getResource("ColorSampler.gif")), JLabel.CENTER);
          new JLabel(" + ", JLabel.CENTER);
          sampleColorLabel.setBorder(BorderFactory.createEtchedBorder());
          sampleColorLabel
          .setToolTipText("<html>Drag mouse to sample the color.<br>" +
                              "Release to set color and save hex value in clipboard.");
          add(sampleColorLabel);
          colorValueField = new JTextField(9);
          colorValueField.setFont(font);
          colorValueField.setEditable(false);
          colorValueField.setBorder(BorderFactory.createLoweredBevelBorder());
          add(colorValueField);
          colorLabel = new JLabel(" ");
          colorLabel.setFont(font);
          colorLabel.setOpaque(true);
          colorLabel.setBorder(BorderFactory.createEtchedBorder());
          add(colorLabel);
          showColor(colorLabel.getBackground(), false);
          try {
               robot = new Robot();
          } catch (AWTException e) {
               System.err.println(e);
          sampleColorLabel.addMouseListener(
               new MouseAdapter() {
                    public void mousePressed(MouseEvent me) {
                         SwingUtilities.getWindowAncestor(ColorSampler.this)
                         .setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
                    public void mouseReleased(MouseEvent me) {
                         Point p = me.getPoint();
                         SwingUtilities.convertPointToScreen(p, me.getComponent());
                         sampleColorAtPoint(p, false);
                         SwingUtilities.getWindowAncestor(ColorSampler.this)
                         .setCursor(Cursor.getDefaultCursor());                         
          sampleColorLabel.addMouseMotionListener(
               new MouseMotionAdapter() {
                    public void mouseDragged(MouseEvent me) {
                         Point p = me.getPoint();
                         SwingUtilities.convertPointToScreen(p, me.getComponent());
                         sampleColorAtPoint(p, true);
                         SwingUtilities.getWindowAncestor(ColorSampler.this)
                         .setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
     public Color getSelectedColor() {
          return colorLabel.getBackground();
     public void setSelectedColor(Color color) {
          if (color.equals(getSelectedColor())) {
               return;
          showColor(color, false);
     public String getSelectedColorString() {
          return getHexStringOfColor(getSelectedColor());
     public void sampleColorAtPoint(Point p, boolean temporary) {
          showColor(robot.getPixelColor(p.x, p.y), temporary);
     void showColor(Color color, boolean temporary) {
          colorLabel.setBackground(color);
          colorValueField.setText(getHexStringOfColor(color));
          colorValueField.selectAll();
          if (!temporary) {
               Toolkit.getDefaultToolkit().getSystemClipboard().setContents(
                    new StringSelection(getHexStringOfColor(color)),null);
               fireStateChanged();
     private String getHexStringOfColor(Color c) {
          int r = c.getRed();
          int g = c.getGreen();
          int b = c.getBlue();
          String rh = Integer.toHexString(r);
          if(rh.length() < 2) {
               rh = "0" + rh;
          String gh = Integer.toHexString(g);
          if(gh.length() < 2) {
               gh = "0" + gh;
          String bh = Integer.toHexString(b);
          if(bh.length() < 2) {
               bh = "0" + bh;
          return ("#"+rh+gh+bh).toUpperCase();
* Only one <code>ChangeEvent</code> is needed per model instance
* since the event's only (read-only) state is the source property.
* The source of events generated here is always "this".
protected transient ChangeEvent changeEvent = null;
protected EventListenerList listenerList = new EventListenerList();
* Adds a <code>ChangeListener</code> to the model.
* @param l the <code>ChangeListener</code> to be added
public void addChangeListener(ChangeListener l) {
          listenerList.add(ChangeListener.class, l);
* Removes a <code>ChangeListener</code> from the model.
* @param l the <code>ChangeListener</code> to be removed
public void removeChangeListener(ChangeListener l) {
          listenerList.remove(ChangeListener.class, l);
* Returns an array of all the <code>ChangeListener</code>s added
* to this <code>DefaultColorSelectionModel</code> with
* <code>addChangeListener</code>.
* @return all of the <code>ChangeListener</code>s added, or an empty
* array if no listeners have been added
* @since 1.4
public ChangeListener[] getChangeListeners() {
return (ChangeListener[])listenerList.getListeners(
               ChangeListener.class);
* Runs each <code>ChangeListener</code>'s
* <code>stateChanged</code> method.
* <!-- @see #setRangeProperties //bad link-->
* @see EventListenerList
protected void fireStateChanged()
Object[] listeners = listenerList.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -=2 ) {
if (listeners[i] == ChangeListener.class) {
if (changeEvent == null) {
changeEvent = new ChangeEvent(this);
((ChangeListener)listeners[i+1]).stateChanged(changeEvent);
     * <code>ColorSampler</code> test.
     * @param args a <code>String[]</code> value
     public static void main(String[] args) {
          final JFrame frame = new JFrame("Desktop Color Sampler");
          frame.setContentPane(new ColorSampler
          frame.pack();
          frame.setVisible(true);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}

Hi vg007, what version LabVIEW are you using? I found an example in the NI Example Finder  (LabVIEW 2014) that might be helpful to accomplish what you are trying to do. In LabVIEW navigate to Help >> Find Examples.
In the Example Finder under the 'Browse' tab go to:
Analysis, Signal Processing and Mathematics >> Signal Processing >> Edge Detection with 2D Convolution.vi
Robert S.
Applications Engineer
National Instruments
Attachments:
Edge Detection with 2D Convolution.vi ‏238 KB

Similar Messages

  • Unexpected behavior with Color Sampler Tool

    Hi,
    I have a small AppleScript that used the Color Sampler Tool to place two color samples on an image. I am able to read back the (r,g,b) color values for these color samples, but the results in the script do not always match the info windows. It looks like Sample Size is always Point Sample when I read back the values in the script, even if the Sample Size is currently set to something like 11 x 11 Average.
    I am running Photoshop CS3 Extended on a MacBook Pro. A copy of my script is attached to this post.
    Does anyone know of a way to get the script to return the values using specific sample size settings?
    Thank you
    -- Bennett

    Wow, that's too bad. Does anyone have a suggestion on how I can do the following then?
    A. Determine what the current sample size is in the toolbar.
    B. Compute the correct average values using a combination of the position information from the Color Sample and the sample size from A.
    By the way, my eventual goal is to build this functionality into an Automation plug-in, so if you have ideas that are not possible in AppleScript but would work in C/C++ I would be interested in learning about those as well.
    Thanks for your help.
    Cheers
    -- Bennett

  • Color sampler onto curve layer?

    I believe I knew how to do this but the brain cell that had the information must have died......
    I BELIEVE I used to take the color sampler and put a sample on my image. Then I created a curves layer. AND, by holding some combination of shift/ctrl/alt and clicking the color sample, the values would transfer to the red,green, and blue layers of my curves layer. From there I could make adjustments...
    In CS4 I'm trying to do this, and I can't get it to work... It isn't the same as using the eyedroppers on the curve OR the hand above the eyedroppers. It actually copied the color sample values onto the individual color channels..... How do I do this in CS4?

    OK, I may just be having an extraordinarily stupid day, so bear with me..........
    The url's in the previous reply don't work any more - I presume this is because the forums have been reorganized?
    But, beyond that - here's what I RECALL doing in the past.......................
    In my image, create a color sampler point using the color sampler tool.
    Create curve adjustment layer and make that layer the current layer.
    Go back to my image and press ctrl+shift and click on the color sample.
    This would put the rgb values (puts a point on the curve) from the color sample on the red, green, and blue channels of the curves layer.
    After reading the last couple replies, I did the same thing.  And I went "back to my image" and clicked on
    the color sample.  I'm STILL not getting the values on my curve layer......
    What am I missing 'cause this can't be as difficult as I'm making it.........?

  • I have never used my mac for desktop publishing before and am having some problems.  This sounds really dumb, but I can't figure out how to put a border around a text box.  Also, how do you edit the border, i.e. border color, thickness, etc. Help!

    I have never used my mac for desktop publishing before and am running into some real problems.  How do you put a border around a text box?  Can you edit the border - color, thickness, etc.?  Help!

    I think the best solution is to read Pages documentation, go to Help and you have a long list of options. Pages is capable of quite sophisticated things, some features are above Nisus or Mellel, so it is not so simple to summarize things in a few lines.

  • Selection by color range and sampled colors

    Hello!
    I'm selecting areas using 'Color Range' and I was wondering if there is a way to view/edit the list of sampled colors (I've seen an option to load/save that list, but I'm looking for a simple way to view it inside Photoshop).
    Thanks!!

    I don't see anything in the interface that does this and I don't know if it is possible with other (external) means. Save and Load simply saves your settings (current choice of Fuzziness, Range, etc.)
    The predefined color and tone choices in Color Range are not the equivalent of sampling a color with the color picker but rather calculations based on algorithm such as the one used in the Selective color to find colors based within a certain hue or tonal range.And the available choices give you all possible primary hues.
    I'm not sure how practical what you want would be - I can't imagine for what would you need this but if that's what yo want, why don't you create a small image painted with the colors of the list of colors you want to use. Then make sure to have both images opened next to each other, apply Color Range on your original image and sample the colors from the other.

  • HT203254 my desktop is not working when i open it all it does is show the color weal and it never gos away on my mac book pro how do i fix it?

    my desktop is not working when i open it all it does is show the color weal and it never gos away on my mac book pro how do i fix it?

    It means, tentatively, that system files are missing or damaged and you will have to reinstall Snow Leopard. See the following:
    Reinstall OS X without erasing the drive
    Do the following:
    1. Repair the Hard Drive and Permissions
    Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    2. Reinstall Snow Leopard
    If the drive is OK then quit DU and return to the installer.  Proceed with reinstalling OS X.  Note that the Snow Leopard installer will not erase your drive or disturb your files.  After installing a fresh copy of OS X the installer will move your Home folder, third-party applications, support items, and network preferences into the newly installed system.
    Download and install the Combo Updater for the version you prefer from support.apple.com/downloads/.

  • Color sample chart shows names and numbers but not the color sample

    on our website we display multiple pages with a color sample chart.
    The descriptions of this chart still displays but the color samples are not shown.

    You can also check for errors in the "Web Developer > Web Console" (Ctrl+Shift+K)
    *https://developer.mozilla.org/en/Tools/Web_Console
    Current Firefox versions have a lot of built-in web developer tools including an Inspector and Style editor.
    *https://developer.mozilla.org/en/Tools
    *https://developer.mozilla.org/en/Tools/Page_Inspector
    *https://developer.mozilla.org/en/Tools/Page_Inspector/HTML_panel
    *https://developer.mozilla.org/en/Tools/Page_Inspector/Style_panel

  • Are the Kuler color schemes and individual colors associated with pantone codes?

    Are the Kuler color schemes and individual colors associated with pantone codes?
    How do you find the pantone reference for a color in a color scheme?

    Hi Monika,
    What is the reason that it is possible to search for (explore) color themes from within the Color Themes panel in InDesign and Photoshop, but not in Illustrator? Seems a bit odd…
    Cheers,
    Marinka

  • Brush is constrained to 90º and appears as Color Sampler Tool

    I'm having a suprise difficulty with my brush tool in that its cursor appears as the color sampler icon and it is constrained to 90 or 180 degree painting (sometimes just 90). Everything was working normally with my last use a day or so ago.
    Other facts:
    I've downloaded the latest update
    Caps lock is not on.
    I'm unable to right click in the options bar and reset all tools
    I'd appreciate any help available. Thanks!

    Apple released the 10.6.7 update for OS X today. This update corrects an issue introduced in the 10.6.5 update that affected modifier keys while using Photoshop.
    More details, including how to install the update, are available in this Knowledge Base document:Alert "Delete the Adobe Photoshop Settings file?" | Tools, functions behave strangely | Photoshop CS5 | Mac OS 10.6.5, 10.6.6

  • I have an error code 2324 after updating iTunes.. then the desktop icon disapeared and i can not sync my ipone or ipad...

    All i get is the installer has encountered an unexpected error installing this package. this may indicate a problem with this package. the error code is 2324 .. I can not even uninstall itunes and start all over again.. i get the same error code.  the desktop icon has disapeared and i am at a complete loss...

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    tt2

  • Sample and simple report

    Hello WebI gurus,
       Could you any one tell me how to create simple report in WebI with Dashboard...
    Thanks in advance
    Muvva

    Hello,
    Simple Webi Reports? If you have experience around Universe then you can use one of them and create simple reports by dragging and dropping objects on the pane.
    Dashboards? Here you can use xcelsius to use your existing webi reports as source for the data (you need to install LIVE office to achieve this).
    Yes and please do look at the product guides of these to get the exhausted features and functions.
    http://help.sap.com/businessObject/product_guides/
    Cheers.

  • Using color sampler values with curves adjustment layer

    Hi, I have just started trying to teach myself javascript.  Based on preliminary research, it's become apparent that there are many functions in Photoshop that are either extremely cumbersome or impossible to code by hand without using the Script Listener.
    My  goal is as follows: first, I will manually load two photos as layers in a single document.  Then I will manually place two or more color sampler points on the document.  At this point I would like the script to create a curves adjustment layer (ideally clipped to layer 2) and place as individual channel anchor points  the RGB data from the color sampler points on Layer 2, and then adjust the output of the points on each channel to the color sampler RGB values of layer 1.  
    As my first script, I realize this is probably going to be a lot of work.
    I did find some code that returns the average value of manually placed color sampler points.  Conceptually then, I would need to add code which creates a new curves adjustment layer and adds those RGB values (from a specific layer)  as anchor points on the individual channels,  and then hides one layer and looks at the RGB values of the color sampler points, and uses them as the output values for each anchor point.
    Sounds simple enough from a conceptual standpoint.
    I'm looking for some guidance on how to get started.
    Which parts will I definitely need Scriptlistener for and will that be adequate to do the job?
    How would you recommend I get started on this?
    Thanks very much for any input.

    The function I had provided was an example into which you would need to feed the values you got with Mike’s code.
    The code below would create a Curves Layer as shown in the screenshot, but I’m not sure it would work reasonably for all cases.
    // with code by mike hale;
    // 2012, use it at your own risk;
    // call the function to run the script
    #target photoshop
    createCurveAdjustmetFromColorSamplers();
    // create a function fo hold most of the code
    function createCurveAdjustmetFromColorSamplers(){
        // first add some condition checks
        // needs an open document in a color mode that supports layers
        if(app.documents.length == 0 || ( app.activeDocument.mode == DocumentMode.BITMAP || app.activeDocument.mode == DocumentMode.INDEXEDCOLOR ) ){   
            alert('This script requires a document in Greyscale, RGB, CMYK, or Lab mode.');
            return;
        // check for at least two colorSamplers
        if(app.activeDocument.colorSamplers.length < 2 ){
            alert('This script requires at least two colorSamplers.');
            return;
        // last check for at least two layers - assume they will be on same level( not in layerSet )
        if(app.activeDocument.layers.length < 2 ){
            alert('This script requires at least two layers.');
            return;
        // create varaibles to hold the colorSampler's color property for each layer
        // for the bottom layer
        var outputArray = new Array();
        // for top layer - array could also be created this way
        var inputArray = [];
        // store the number of samples because it will be needed in more than one place
        var numberOfSamples = app.activeDocument.colorSamplers.length;
        // hide the top layer
        app.activeDocument.layers[0].visible = false;
        // collect the samples from the bottom layer
        for(var sampleIndex = 0; sampleIndex < numberOfSamples; sampleIndex++ ){
            outputArray.push(app.activeDocument.colorSamplers[sampleIndex].color);
        // turn the top layer back on
        app.activeDocument.layers[0].visible = true;
        // collect those samples
        for(var sampleIndex = 0; sampleIndex < numberOfSamples; sampleIndex++ ){
            inputArray.push(app.activeDocument.colorSamplers[sampleIndex].color);
        // make sure the top layer is the activeLayer
        app.activeDocument.activeLayer = app.activeDocument.layers[0];
    // create arrays of the color values:
    var theArray = [[0, 0, 0, 0, 0, 0]];
    for (var m = 0; m < inputArray.length; m++) {
    theArray.push([inputArray[m].rgb.red, outputArray[m].rgb.red, inputArray[m].rgb.green, outputArray[m].rgb.green, inputArray[m].rgb.blue, outputArray[m].rgb.blue]);
    theArray.push([255, 255, 255, 255, 255, 255]);
    // sort;
    theArray.sort(sortArrayByIndexedItem);
    // makeCurveAdjustmentLayer();
    rgbCurvesLayer (theArray)
    ////// make rgb curves layer //////
    function rgbCurvesLayer (theArray) {
    // =======================================================
    var idMk = charIDToTypeID( "Mk  " );
        var desc5 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref2 = new ActionReference();
            var idAdjL = charIDToTypeID( "AdjL" );
            ref2.putClass( idAdjL );
        desc5.putReference( idnull, ref2 );
        var idUsng = charIDToTypeID( "Usng" );
            var desc6 = new ActionDescriptor();
            var idType = charIDToTypeID( "Type" );
                var desc7 = new ActionDescriptor();
                var idpresetKind = stringIDToTypeID( "presetKind" );
                var idpresetKindType = stringIDToTypeID( "presetKindType" );
                var idpresetKindDefault = stringIDToTypeID( "presetKindDefault" );
                desc7.putEnumerated( idpresetKind, idpresetKindType, idpresetKindDefault );
            var idCrvs = charIDToTypeID( "Crvs" );
            desc6.putObject( idType, idCrvs, desc7 );
        var idAdjL = charIDToTypeID( "AdjL" );
        desc5.putObject( idUsng, idAdjL, desc6 );
    executeAction( idMk, desc5, DialogModes.NO );
    // =======================================================
    var idsetd = charIDToTypeID( "setd" );
        var desc8 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref3 = new ActionReference();
            var idAdjL = charIDToTypeID( "AdjL" );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref3.putEnumerated( idAdjL, idOrdn, idTrgt );
        desc8.putReference( idnull, ref3 );
        var idT = charIDToTypeID( "T   " );
            var desc9 = new ActionDescriptor();
            var idpresetKind = stringIDToTypeID( "presetKind" );
            var idpresetKindType = stringIDToTypeID( "presetKindType" );
            var idpresetKindCustom = stringIDToTypeID( "presetKindCustom" );
            desc9.putEnumerated( idpresetKind, idpresetKindType, idpresetKindCustom );
            var idAdjs = charIDToTypeID( "Adjs" );
                var list1 = new ActionList();
                    var desc10 = new ActionDescriptor();
                    var idChnl = charIDToTypeID( "Chnl" );
                        var ref4 = new ActionReference();
                        var idChnl = charIDToTypeID( "Chnl" );
                        var idChnl = charIDToTypeID( "Chnl" );
                        var idRd = charIDToTypeID( "Rd  " );
                        ref4.putEnumerated( idChnl, idChnl, idRd );
                    desc10.putReference( idChnl, ref4 );
                    var idCrv = charIDToTypeID( "Crv " );
                        var list2 = new ActionList();
    // add r points;
    for (var m = 0; m < theArray.length; m++) {
              addCurvePoint (list2, theArray[m], 0)
                    desc10.putList( idCrv, list2 );
                var idCrvA = charIDToTypeID( "CrvA" );
                list1.putObject( idCrvA, desc10 );
                    var desc15 = new ActionDescriptor();
                    var idChnl = charIDToTypeID( "Chnl" );
                        var ref5 = new ActionReference();
                        var idChnl = charIDToTypeID( "Chnl" );
                        var idChnl = charIDToTypeID( "Chnl" );
                        var idGrn = charIDToTypeID( "Grn " );
                        ref5.putEnumerated( idChnl, idChnl, idGrn );
                    desc15.putReference( idChnl, ref5 );
                    var idCrv = charIDToTypeID( "Crv " );
                        var list3 = new ActionList();
    // add g points;
    for (var m = 0; m < theArray.length; m++) {
              addCurvePoint (list3, theArray[m], 2)
                    desc15.putList( idCrv, list3 );
                var idCrvA = charIDToTypeID( "CrvA" );
                list1.putObject( idCrvA, desc15 );
                    var desc20 = new ActionDescriptor();
                    var idChnl = charIDToTypeID( "Chnl" );
                        var ref6 = new ActionReference();
                        var idChnl = charIDToTypeID( "Chnl" );
                        var idChnl = charIDToTypeID( "Chnl" );
                        var idBl = charIDToTypeID( "Bl  " );
                        ref6.putEnumerated( idChnl, idChnl, idBl );
                    desc20.putReference( idChnl, ref6 );
                    var idCrv = charIDToTypeID( "Crv " );
                        var list4 = new ActionList();
    // add b points;
    for (var m = 0; m < theArray.length; m++) {
              addCurvePoint (list4, theArray[m], 4)
                    desc20.putList( idCrv, list4 );
                var idCrvA = charIDToTypeID( "CrvA" );
                list1.putObject( idCrvA, desc20 );
            desc9.putList( idAdjs, list1 );
        var idCrvs = charIDToTypeID( "Crvs" );
        desc8.putObject( idT, idCrvs, desc9 );
    executeAction( idsetd, desc8, DialogModes.NO );
    return app.activeDocument.activeLayer;
    ////// add curve point //////
    function addCurvePoint (theList, valueHor, theNumber) {
    var desc11 = new ActionDescriptor();
    var idHrzn = charIDToTypeID( "Hrzn" );
    desc11.putDouble( idHrzn, valueHor[theNumber] );
    var idVrtc = charIDToTypeID( "Vrtc" );
    desc11.putDouble( idVrtc, valueHor[theNumber+1] );
    var idPnt = charIDToTypeID( "Pnt " );
    theList.putObject( idPnt, desc11 );
    ////// sort a double array, thanks to sam, http://www.rhinocerus.net/forum/lang-javascript/ //////
    function sortArrayByIndexedItem(a,b) {
    var theIndex = 0;
    if (a[theIndex]<b[theIndex]) return -1;
    if (a[theIndex]>b[theIndex]) return 1;
    return 0;

  • Color Sampler not working outside my window! Urgent, please help!

    I just installed Photoshop on my Surface Pro 3. I am doing a presentation in a few hours where I will need to be able to demonstrate the use of the Color Sampler outside the window. It doesn't work. It goes up to the edge of the workspace but does not sample beyond that. I've tried using the pen, the trackpad and the mouse. None of them work. If I try to do it on my Windows 8.1 desktop, it works fine. Help!

    Just looked into this and have found a resolution. Always learning new tricks!! So forgive me I was wrong in the first post.
    You CAN do it by clicking within the workspace and then dragging outside so continually holding down then letting go outside the workspace.
    Colour sampling outside Photoshop | Shape Shed
    Hope this helps!

  • Code does not have color

    My source code in GL for a simple HTM page is not color coded. It's all in black. I changed the preferences and the only thing that's in color is the highlight of the line I'm on. The text is not, even though I have colors set for it in the prefs. What's going on? The text will not get bigger either... thoughts?

    Sorry, should have provided more info...
    GoLive CS2
    Mac 10.2.8
    In Preferences, under Source > Themes, I changed things there.
    file extension is .htm
    I opened a CSS file and the source code for that IS color coded, so I don't know. I created a new file and it is also color coded. Would it make a difference if the file I'm editing is located on another computer and I'm tapping in through a network connection??

  • Issues while extending simple.desktop laf in R12 configurator

    what style ( 11i or R12 ) should I see for a LAF
    created byt extending "Simple Desktop" LAF using Customize Look and Feel
    administrator responsibility in R12 ?
    When I say "style" , I am talking about top navigation ( tabs on right in 11i VS Tabs on left for R12 ) and also
    the color schemes.
    I am getting old style dynamic tree and 11i style layout ( repositiry and workbench tabs on right ) and green and orange colors all over .. i need to get as close as R12 swan UI with different colors ... any ideas ??

    Hi Aj
    I have created a region in Jdeveloper
    and try to extend taht region on EBS page
    I also done with imprt that RN
    but when I try to extend it
    it gives an error
    if try to extend diff region that works fine

Maybe you are looking for

  • Iphone 5C wifi greyed out and screen going crazy

    Hi I bought my iPhone back in October in Us from Tmobile, since December the wifi greyed out and hasn't worked once (been living on data) now recently the screen goes crazy, it types by its self unlocks the phone (dont have a password) sometimes call

  • How to get rid of hidden partitions display in Disk Utility?

    Running Snow Leopard I used the Terminal (defaults write com.apple.DiskUtility DUDebugMenuEnabled 1) to enable the Disk Utility Debug Menu. I then turned on the Show Every Partition so I could see the hidden partitions (but grayed out) in the disk/vo

  • Oracle Secure enterprise Search versus Oracle Text

    I'm involeved in a project where we're using Oracle text for its text search capability. Yesterday during a meeting Oracles Secure Enterprise search engine came up. I see similar functionality offered in both products - Oracle text comes with 10g - n

  • Problem in FM SD_SHIPMENTS_SAVE

    Hi I am using FM SD_SHIPMENTS_SAVE to assign delivery to the shipment.I am getting an update error.Delivery is not assigned to HU whenever I send shipment item numbe as 001 in the internal table for a new shipment.If the shipment is already assigned

  • CE portal vs regular portal

    Hi, CE 7.1 comes with a simplified portal. The CE portal cannot be used as the main portal, a FPN has to be set up between the main 7.0 and the CE 7.1 portal. This makes sense now, when 7.1 runs on JEE5, but when there will be a generally available E