Color problem, black 'noise' on specific colors

Dear adobe users,
At the moment I have a problem with a few specific colors within photoshop CS6, on top of my original colors you'll see a black noise effect. Some effect you'll suspect when you've turned on a different color mode. But i'm working with the normal RGB/8 color modes which shouldn't be a problem. If i save this document to a JPEG and open it with Windows Preview, the color problems dissapear. Funny thing is, if I get my color picker and hover on a black spot on my original document, the right color shows up in my color picker and not the black color I see on my screen.
What can cause this problem? Tried google to find the problem, but no luck so far. Driving me crazy as this isnt really working for me. Thanks for the help so far!
Printscreen of my problem:
Original document (jpeg):
Regards
Marcel

I'm guessing you have an ATI video card and have updated to Catalyst 13.1 (or gotten the WHQL driver through Windows Update).
Catalyst 13.1 has a problem properly running Photoshop CS6's GPU-based Adobe Color Engine.  Basically if the red channel reaches 0, all color will be blacked out.
A workaround that retains most of your GPU functionality but avoids the problem is this:  Change the Drawing Mode to Basic in the Advanced Photoshop GPU preferences.  Restart Photoshop after making the change.
A possibly more acceptable workaround is to completely uninstall Catalyst 13.1, then seek out Catalyst 12.8, specifically, on Adobe's web site.  12.8 works quite well in Advanced mode.
-Noel

Similar Messages

  • I need to replace a color on my image with a specific color from another part of the image.  How?!

    I have spent over 2 hours trying to figure out how to replace a color on one part of my image with a specific color shown on another part of the image.  So far I have been able to go to "Replace Color" on my Adobe Photoshop version, but it seems that I can only change the hue and brightness of the color that it currently is.  I need to use a specific color so this does not help me.  Does anyone know how to complete the task I am referring to?
    Also, please keep in mind that I am using Adobe Photoshop 6.0, not a fancy cs version or anything.  So it's pretty old school...
    Any help/feedback is greatly appreciated!  Thank you.

    Hi brookehelene,
    You might consider making a selection the object and using a color fill layer set to the color blend mode instead of replace color.
    I used the same picture as kendallplant did and changed the color on the same flower by sampling the pink color from the flower to the right)
    (click on the screenshots below for larger views)
    1. Select>Color Range
       (i used color range because the dialog is somewhat similar to the replace color dialog, except one is making a selection instead of replacing a color)
       (there are many other ways to make the selection such as the magic wand, so if your more familar with the other selection tools you can use those instead to make your selection)
    2. Use the eyedroppers and fuzziness slider in the color range dialog to make the selection of the object.
       (in the screenshot below the white areas are selected and black areas are not)
       (your selection probably won't be perfect, but you can paint on the layer mask to refine the selection)
    3. After you press the okay in the color range dialog you'll see the selection (marching ants)
       At the bottom of the layers palette press the Create New Fill or Adjustment Layer icon
       to reveal a list and choose Solid Color.
       Then use the eyedropper to sample a color from your image and press ok.
       Change the Blend mode for the color fill layer to Color (top of the layers palette)
    4. As you can see a lot has been selected besides the flower.
        To refine the areas of color, paint on the layer mask with the paintbrush tool.
        Use white to add the color or black to subtract the color
        You can press the D key on the keyboard to get the default colors (black and white) in the toolbox
        and press the X key to switch between the two when painting on the layer mask.
    Even though the above takes longer you can easily change the color or modify the areas that you want to change the color on.
    To change the color you can double click on the color fill icon in the layers panel.
    You can also use other layer blend modes besides color such as hue, so you might try some of the others and see what they do.

  • Printing in color or black & white in VB6 and Crystal Reports 8.5

    Post Author: elsyvaldez
    CA Forum: General
    How can I programatically print in color or black & white?  I am programming in Visual Basic 6.0 using the Crystal Reports 8.5 Active X Designer Runtime Report object (CRAXDRT.dll).    Our users want the option to print either in color or black & white to a color printer.  I am trying to print many separate reports (for a large group of accounts) in one click of the VB6 "Print" command button without having to display the Printer Setup dialog box for each separate report.  The Report object in CRAXDRT has a method to display the printer setup dialog box but has no property to change "Color" mode (similar to the "PaperOrientation" or "PrinterDuplex" properties).  Is there a way that our users can bring up the Printer Setup dialog box just once, choose color mode, and then make this choice effective for all separate reports printed using CRAXDRT?

    Hi Sastry
    I can print multiple pages from notepad without any issues. It is only the print from the crystal OCX control that has the issue. It has it's own print dialog box.
    Thanks
    Peter

  • Pdf's created in Indesign having problem in "Black" color when it overlap with other color.

    Hi all,I
    Please respond to this as soon as possible since this is now in printing stage we need to send it immediately.
    Adobe disabled attachment, I just made a screenshot and sending you the image as attachment for your reference.
    The design has "Black" overlapping on "Blue" giving transparent on Blue color, see the pdf for reference.
    Please not that there is no transparency in "Black" or any other color used in that page.
    This is related to "preserve overprint" problem, when I switch off the preserve overprint in "distiller" setting I am getting the correct result but "Black" become "Knockout" instead of "overprint".
    Is there is any way to solve this problem.
    Please advice.
    Kaviya

    When you Knockout the colour it should cut a hole in the shapes below it -
    Start by creating a New Black Swatch
    Then Apply that swatch to your black frame
    Below I have turned off the Black Separation, and you can see that it has knocked a hole right through the items below - I've also shown you the Attributes Panel - you can see in the Spearations panel to that the black is still 100%
    Below is what happens when you have Black set to Overprint
    YOu can clearly see that the values are added up - You now have a 284% ink coverage here - so anywhere the black goes over the green here the values are added together and that gives you a different shade of black, because the Black is PRINTING OVER the other colours and adding, as ink is transparent, not opaque.
    If the black frame goes off into the white it will be 100% for whatever is touching the white, and then 284% when hitting the green here, so you get two distinct shades of black.

  • My firefox background color is black how to solve this problem?

    Every time when i open firefox my background is black. for fix the proble go to tools then options then colors then tick "use system colors" and "Allow page to chooses their own colors, instead of my selection above" then press double "ok" colors problem is fixeed. but when i close and re open firefox see same problem meaning my background is black. Please how can i solve
    ? thanks!

    My new laptop arrived today and it is the first time I ever see Windows 8. I experienced this problem with a black background in any Firefox page.
    After a long troubleshooting process on a draconic OS I have never experienced, I found the culprit.
    1. Hover your mouse (don't click) over the top-right corner (or press the Window key and the C key.) This will open the charm bar.
    2. Select Settings.
    3. Choose Personalize.
    4. Change the background/wallpaper.
    5. Enjoy your Firefox with its true colors. Hoozah!
    After applying that solution, if the background of your favorite website looks a flat white, then:
    1. Go to TOOLS in Firefox. Select Content.
    2. Click the Colors button.
    3. Enable "Allow pages to choose their own colors, instead of my selections above"
    4. Click OK and OK.
    5. Firefox will automatically display default background colors of websites.

  • My iphone has a problem, it simply does not work, the screen is all black with a few colorful scribbles and images blend, I used it only took 6 days and returned to service when operated only 7 more days and it happened again the same thing, what do I do?

    My iphone has a problem, it simply does not work, the screen is all black with a few colorful scribbles and images blend, I used it only took 6 days and returned to service when operated only 7 more days and it happened again the same thing, what do I do?

    Reset the PRAM
    Reinstall the operating system from the dvd (you will not loose your data)

  • Color Problems in Lion (Colors Missing / Washed Out / Invisible)

    Hello,
    I recently purchased a new macbook air, and I'm loving it. I don't know if the problem im experiencing is an issue with Lion, or with the display hardware of this macbook- but colors on this display (either due to the hardware or the Lion OS) are getting really washed out. Sites that would previously look fine, now appear to be missing a lot of the colors that I know they are supposed to have.
    What's even stranger, is that if I have an OSX window open above the browser/website I can actually see the correct colors by moving the top window across the screen and looking at the colors in the window just below it within the dropshadow area. Somehow the dropshadow of the upper window causes some kinda  color transform magic that shows the colors as they should be, but the correct colors only appear in the "dropshadow" area. This tells me that the correct colors are there, but somehow the display or software is not displaying them correctly.
    I wish I could post images to show the problem, but I know if I post any, they will just look correct on whatever display user's are viewing them through, as this problem seems to be specific to this LED display / Lion.
    Look at http://snipt.org. The "New Snipt" box should appear as a light gray box with a darker 4 pixel border and a blue header. The entire box should have a dropshadow. On every other display I have used this is how it appears, and it is correct. When I view it on my MBA/Lion, all the grays and dropshadows are gone, Its basically a white page, with a blue header and some dropdown boxes. If I open an OSX window above it, the dropshadow of that window does something to the colors which reveals the grays and dropshadows on snipt.org but they are only shown in the are covered by the dropshadow of the topmost OSX window.
    Has anyone else experienced this? As a web developer this makes things extremely difficult, the colors I see on this machine are inconsistent with ANY other display. Is there a way to fix this?
    I can try and take a video with my iPhone to convey the issue if this description doesn't make sense. Please help me out!
    Thanks
    Dan

    Aha! After posting this in "related posts" section on the right, I found this answer:
    "Open the Universal Access pane of System Preferences, click on the Seeing tab, turn off White on Black, and drag the Contrast slider all the way to the left."
    That fixed it! The colors appear correctly again! Websites actually look good instead of being entirely white!
    Apple should really change this to be the default setting, rather than shipping with colors being oversaturated.
    Hope this helps someone too!

  • Display color problem - asking for a color solution

    So I have this serious problem with my Macbook Pro.
    Some months ago I suddenly saw green colors in black area's and pink line colors in white areas.
    Text on white background was extremely frustrating to read, since it was surrounded with small pink lines and flickering.
    Note this was only near max white and max black areas of the screen.
    I found out that it was due to a hardware failure, since slightly bending the laptop (!!) would remove the problem
    Attaching an external monitor doesn't show the defect, and booting in Windows 7 (bootcamp) still shows the same screen problem.
    Searching the web, it appears that it was a NVidia related heat problem, known to my model, but the offer to get it fixed for free by apple (since it was a known issue) had already run out december 2012 (!!). I think my laptop is about 3-4 years old, and the battery pretty much died on me the first year, probably due to heavy usage and the graphic card getting too hot. There are small sweat/corosion marks of where my hand are placed when typing, on the aluminium, due to how hot my laptop got. It sometimes got so hot I couldn't touch the aluminium on the top left corner near the 1-2-Q-W keys.
    Fixing my Macbook is too expensive. Just getting someone to look at it to diagnose it (without repairing it), costs a lot in my country, and we have no official apple store, only authorized resellers. I know it's probably the motherboard, because I tried to unscrew the backlid and gently touch certain area's on the motherboard with a pen, while the computer was still running, to find out where the short circuit was. I only started this kind of trying to "self service" it, because I knew how expensive replacing the motherboard would be (if that was even the issue?).
    I have multiple times tried to place something up against the sensitive area's on the motherboard, and then screw back the backlid, to put some pressure on it, which at first worked brilliantly and removed the color issue for some weeks, before it started reappearing. I think the heat from the laptop slowly makes the motherboard adapt, and the problem returns. Extremely frustrating indeed.
    I hope I can one day afford a Macbook Air, but until then, I don't want to throw more money after my poor macbook (which I pronbably can't sell anyway, like previous mac's I've owned, the day get a new. It's too worn out + battery got only 5min on a full charge).
    I think it's wisest to rather save the money for a Macbook Air, and try to survive until then. Therefor I was hoping someone could help me with a temporary solution.
    In Windows 7, using the Nvidia Control Panel to apply color management, I was able to adjust the individual color output values, and thereby remove the the screen issue! Maybe the colors are not as good anymore, but it sure beats not getting a headache after 10minutes trying to read an article.
    I tried the same thing on the mac, using Preferences>Displays>Color>Calibrate, but this guide is much harder to use to get a decent result (since only the last 2 options really makes a difference, but changes the colors completely, which I can't change by going back to the first color settings since then it just undos the last step I just did. I'm currently writing this with a very blue pale screen.
    I also tried to use ColorSync Utility, expecting to enter values manually, but contrary to the articles I read about using ColorSync, I cannot edit the values in the color profile I created (I can only change the ASCII text input fields). Trying to save the profile gives me the error 'The Document "screenbug.icc" could not be saved.'
    I tried to look for alternative color calibration software, but most of them required hardware, or expensive full version to unlock the settings I needed (like SuperCal).
    I hope some tech savy users out there that can help me, or at least make my life with my macbook less of a pain.
    All help is much appreciated!!
    PS: I've been a loyal Mac user since always. Few things I've learned is:
    1) Don't buy the first version of new hardware. Wait about a month for reviews, to check for issues. I had a problem with an expensive MacPro that had to be replaced, but luckily for free since it was Apple's mistake. Sometimes Apple products also get minor internal changes/fixes without announcements, to help solve reported issues from early buyers.
    3) Take care of you Mac, especially so because you can often sell your used Mac's for quite a value the day you want to upgrade. I've sold about 3 Mac's in my lifetime, for quite a gain, though I don't expect this macbook to do as well, if at all. But it's normally something to be cautious about.
    3) Don't order custom configurations from the Apple Store, if you can live without it (+ it's usually crazy overprices). I payed extra to get the NVidia GeForce 9600M, and was happy with it for the first couple of years, but is now causing me all the problems I have today + made my Macbook worthless.
    Stick with what the default configuration if possible, as other configurations might not have been tested carefully.

    Who exactly is your comment "I am asking you to fix this problem soon" directed at?
    Remember that you are posting on a user to user forum so nobody can really help you.  If you want to give feedback to Apple, then contact them directly at http://www.apple.com/feedback.
    Also, if you have an iPhone 3G and iOS 4.2.1 is the latest software that you can install on your phone, then there is absolutely nothing that anyone can do to fix the problem if you want to install Skype that requires iOS 4.3 - what do you think anyone can magically do?
    iPhone 3G is a very old phone now and if you want to install Skype on your phone, then you need to go out and buy a new iPhone - either a 4s or a 5.  Nothing more to it.  Buy a new phone.

  • Color problem with ProPhoto RGB color space

    Hi, everyone,
    I have wery special problem I think. I use MacBook pro 15" with retina display, adobe Photoshop CC and when I export RAW (from Nikon D7000) from Lightroom 5 to Photoshop with settings: 16 bit TIF, color space: ProPhoto RGB I have a problem with displaying the correct colors. As you can see in this picture:
    My problem are some "green" artefacts in absolutely black and white picture. I tried myself to solve this problem and found the following facts: when I convert picture into Adobe RGB or sRGB color space is everything OK - without green artefacts.
    But here is one important fact: I have calibrated monitor by datacolor spyder4elite and problem with ProPhoto RGB incorrect color displaying is only when the color calibration configuration is loaded. When I change my display calibration to standard apple color LCD profile than is everything OK.
    But using uncalibrated monitor and also Adobe RGB color space are no right solutions for me.
    My question is why I have problem with displaying ProPhoto RGB color space in photoshop under calibrated monitor profile and can anybody help me please?
    Thanks for answers.

    That's a classic example of the basic problem with 16 bit color. There is no solution that I know of.

  • How to chose either you want to print a picture or document black in white or color?

    How to chose either you want to print a picture or document black in white or color from your computer before printing; regardless of picture being colored or black in white.  
    I bought HP Laserjet Pro 200 Color Mfp m276 yesterday. I am completely new to printers and printing. My question is how to chose either the print out would be color or Black in white. 
    At my school liberary and public liberaries, when i print an image or document, in there printer drop down selection menu, they have the option of Color print or black in white print. I want to make mine same too. I have two printers there which is 
    1.  HP Laserjet Pro 200 Color Mfp PCL6
    2. NPI16FE39 (HP Laserjet Pro 200 Color Mfp m276NW)
    I tried goint to Contol Panel>Drvices and Printers> HP Laserjet Pro 200 Color> printing preferences> and selected "Print in Graystyle"
    than i printed from HP Laserjet Pro 200 Color; by selecting it from drop down menu, but the print out was still coloured..
    PLEASE HELP ME!!
    it may be something to do with printing settings..
    I just want to select between Black in White and color ... before printing the page out (regardless of picture being colored)

    Hi,
    Here's a link to a thread with a similar issue on a different printer that might help.
    "Although I work for HP, I'm speaking for myself and not on behalf of HP"
    "Say "Thanks" by clicking the Kudos Star in the post that helped you.
    --Please mark the post that solves your problem as "Accepted Solution"

  • My printer is Hp printer 932C it will only print in black and white not color

    my printer is Hp printer 932C it will only print in black and white not color I got a new color cartage nothing still only printing in back and whit what can i do

    There are a few things to check:
    Make sure the blue tape has been removed from the nozzle plate.
    Print a diagnostic page as shown in method 4 here.  Does this page print color?  If so the issue may be your driver settings.  Check for a "Print in grayscale" setting and uncheck this box.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • How can I change the text layers to a specific color at the same time and in the fast way?

    Dear all!
    I am using Photoshop CS5. I typed 65 text layers in my file and wish to change their colors to a specific Black Color, but I don't know how to select all the layers at the same time so that I can change all the text layers from Red Color to Black Color in the fast way. Now I only select one layer and then change. It means I must select and change 65 times for the text layers. Hope you can understand what I mean.
    Thanks a lot.
    My Kindest Regards,
    LUCK

    One way is to select all the text layers, select the type tool in the tool box
    and set the color from the tool options bar.
    MTSTUNER

  • JTree custom renderer setting selection background color problem

    Hi,
    I have a JTree with a custom icon renderer that displays an icon. The JTree is part of a TreeTable component. Iam having a problem setting the selection background uniformly for the entire row. There is no problem when there is no row selected in the JTable.
    My present code looks like this:
    Iam overriding paint in my renderer which extends DefaultCellRenderer.
           super.paint(g);
            Color bColor = null;
            if(!m_selected) {
                 if(currRow % 2 == 0) {
                      bColor = Color.WHITE;
                 } else {
                                                    bColor = backColor;
            } else {
                 bColor = table.getSelectionBackground();                  bColor = getRowSelectionColor();
         if(bColor != null) {
                           g.setColor(bColor);
             if(!m_selected) {
                   g.setXORMode(new Color(0xFF, 0xFF, 0xFF));
             } else {
                 g.setXORMode(new Color(0x00, 0x00, 0x00));
                  I have a color I arrive at using some algorithm that I want using method getRowSelectionColor(). The other cells in the row have this color. But the cell containing the tree node shows different color. Iam not able to arrive at the right combination of the color to set and the xor color so my tree node also looks like the other cells in the row.
    It is not a problem really as the table still looks good. Its just that the tree node looks like it has been highlighted and this might cause a problem when a table cell is highlighed later on in the application ( two cells in the row would be highlighted causing confusion).
    Any help would be appreciated.
    Regards,
    vidyut

    Hi Camickr,
    Thanks for the reply. Iam sorry I didn't include the sources the first time around. There were too many of them. I have created a small, self-contained, compilable program that demonstrates the problem and including it herewith. Still there's quite many files but they are all needed Iam afraid. The only one you will have to concern yourself fior this problem is the file IconRenderer.java. The treenode background and the other cells background are not in sync when table row is not selected in this example though. But they are in my real program. I just need them to be in sync i.e have the same background color when the row is selected.
    Your help would be very much appreciated.
    These are the files that are included below:
    1. AbstractTreeTableModel.java
    2. Bookmarks.java
    3. BookmarksModel.java
    4. DynamicTreeTableModel.java
    5. IconRenderer.java
    6. IndicatorRenderer.java
    7. JTreeTable.java
    8. TreeTableExample3.java (contains main)
    9. TreeTableModel.java
    10. TreeTableModelAdapter.java
    The copyright and javadocs information has been stripped for clarity.
    cheers,
    vidyut
    // AbstractTreeTableModel.java BEGIN
    import javax.swing.tree.*;
    import javax.swing.event.*;
    public abstract class AbstractTreeTableModel implements TreeTableModel {
        protected Object root;    
        protected EventListenerList listenerList = new EventListenerList();
        public AbstractTreeTableModel(Object root) {
            this.root = root;
        // Default implementations for methods in the TreeModel interface.
        public Object getRoot() {
            return root;
        public boolean isLeaf(Object node) {
            return getChildCount(node) == 0;
        public void valueForPathChanged(TreePath path, Object newValue) {}
        // This is not called in the JTree's default mode:
        // use a naive implementation.
        public int getIndexOfChild(Object parent, Object child) {
            for (int i = 0; i < getChildCount(parent); i++) {
             if (getChild(parent, i).equals(child)) {
                 return i;
         return -1;
        public void addTreeModelListener(TreeModelListener l) {
            listenerList.add(TreeModelListener.class, l);
        public void removeTreeModelListener(TreeModelListener l) {
            listenerList.remove(TreeModelListener.class, l);
        protected void fireTreeNodesChanged(Object source, Object[] path,
                                            int[] childIndices,
                                            Object[] children) {
            // Guaranteed to return a non-null array
            Object[] listeners = listenerList.getListenerList();
            TreeModelEvent e = null;
            // Process the listeners last to first, notifying
            // those that are interested in this event
            for (int i = listeners.length-2; i>=0; i-=2) {
                if (listeners==TreeModelListener.class) {
    // Lazily create the event:
    if (e == null)
    e = new TreeModelEvent(source, path,
    childIndices, children);
    ((TreeModelListener)listeners[i+1]).treeNodesChanged(e);
    protected void fireTreeNodesInserted(Object source, Object[] path,
    int[] childIndices,
    Object[] children) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    TreeModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length-2; i>=0; i-=2) {
    if (listeners[i]==TreeModelListener.class) {
    // Lazily create the event:
    if (e == null)
    e = new TreeModelEvent(source, path,
    childIndices, children);
    ((TreeModelListener)listeners[i+1]).treeNodesInserted(e);
    protected void fireTreeNodesRemoved(Object source, Object[] path,
    int[] childIndices,
    Object[] children) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    TreeModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length-2; i>=0; i-=2) {
    if (listeners[i]==TreeModelListener.class) {
    // Lazily create the event:
    if (e == null)
    e = new TreeModelEvent(source, path,
    childIndices, children);
    ((TreeModelListener)listeners[i+1]).treeNodesRemoved(e);
    protected void fireTreeStructureChanged(Object source, Object[] path,
    int[] childIndices,
    Object[] children) {
    // Guaranteed to return a non-null array
    Object[] listeners = listenerList.getListenerList();
    TreeModelEvent e = null;
    // Process the listeners last to first, notifying
    // those that are interested in this event
    for (int i = listeners.length-2; i>=0; i-=2) {
    if (listeners[i]==TreeModelListener.class) {
    // Lazily create the event:
    if (e == null)
    e = new TreeModelEvent(source, path,
    childIndices, children);
    ((TreeModelListener)listeners[i+1]).treeStructureChanged(e);
    // Default impelmentations for methods in the TreeTableModel interface.
    public Class getColumnClass(int column) { return Object.class; }
    public boolean isCellEditable(Object node, int column) {
    return getColumnClass(column) == TreeTableModel.class;
    public void setValueAt(Object aValue, Object node, int column) {}
    // Left to be implemented in the subclass:
    * public Object getChild(Object parent, int index)
    * public int getChildCount(Object parent)
    * public int getColumnCount()
    * public String getColumnName(Object node, int column)
    * public Object getValueAt(Object node, int column)
    // AbstractTreeTableModel.java END
    // Bookmarks.java BEGIN
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    import javax.swing.text.html.parser.*;
    public class Bookmarks {
    /** The root node the bookmarks are added to. */
    private BookmarkDirectory root;
    * Creates a new Bookmarks object, with the entries coming from
    * <code>path</code>.
    public Bookmarks(String path) {
         root = new BookmarkDirectory("Bookmarks");
         if (path != null) {
         parse(path);
    * Returns the root of the bookmarks.
    public BookmarkDirectory getRoot() {
         return root;
    protected void parse(String path) {
         try {
         BufferedReader reader = new BufferedReader(new FileReader
                                       (path));
         new ParserDelegator().parse(reader, new CallbackHandler(), true);
         catch (IOException ioe) {
         System.out.println("IOE: " + ioe);
         JOptionPane.showMessageDialog(null, "Load Bookmarks",
                             "Unable to load bookmarks",
                             JOptionPane.ERROR_MESSAGE);
    private static final short NO_ENTRY = 0;
    private static final short BOOKMARK_ENTRY = 2;
    private static final short DIRECTORY_ENTRY = 3;
    private class CallbackHandler extends HTMLEditorKit.ParserCallback {
         /** Parent node that new entries are added to. */
         private BookmarkDirectory parent;
         /** The most recently parsed tag. */
         private HTML.Tag tag;
         /** The last tag encountered. */
         private HTML.Tag lastTag;
         * The state, will be one of NO_ENTRY, DIRECTORY_ENTRY,
    * or BOOKMARK_ENTRY.
         private short state;
         * Date for the next BookmarkDirectory node.
         private Date parentDate;
         * The values from the attributes are placed in here. When the
         * text is encountered this is added to the node hierarchy and a
    * new instance is created.
         private BookmarkEntry lastBookmark;
         * Creates the CallbackHandler.
         public CallbackHandler() {
         parent = root;
         lastBookmark = new BookmarkEntry();
         // HTMLEditorKit.ParserCallback methods
         * Invoked when text in the html document is encountered. Based on
         * the current state, this will either: do nothing
    * (state == NO_ENTRY),
         * create a new BookmarkEntry (state == BOOKMARK_ENTRY) or
    * create a new
         * BookmarkDirectory (state == DIRECTORY_ENTRY). If state is
    * != NO_ENTRY, it is reset to NO_ENTRY after this is
    * invoked.
    public void handleText(char[] data, int pos) {
         switch (state) {
         case NO_ENTRY:
              break;
         case BOOKMARK_ENTRY:
              // URL.
              lastBookmark.setName(new String(data));
    parent.add(lastBookmark);
    lastBookmark = new BookmarkEntry();
              break;
         case DIRECTORY_ENTRY:
              // directory.
              BookmarkDirectory newParent = new
                   BookmarkDirectory(new String(data));
              newParent.setCreated(parentDate);
              parent.add(newParent);
              parent = newParent;
              break;
         default:
              break;
    state = NO_ENTRY;
         * Invoked when a start tag is encountered. Based on the tag
         * this may update the BookmarkEntry and state, or update the
         * parentDate.
         public void handleStartTag(HTML.Tag t, MutableAttributeSet a,
                        int pos) {
         lastTag = tag;
         tag = t;
         if (t == HTML.Tag.A && lastTag == HTML.Tag.DT) {
    long lDate;
              // URL
              URL url;
              try {
              url = new URL((String)a.getAttribute(HTML.Attribute.HREF));
              } catch (MalformedURLException murle) {
              url = null;
              lastBookmark.setLocation(url);
              // created
              Date date;
              try {
    lDate = Long.parseLong((String)a.getAttribute("add_date"));
    if (lDate != 0l) {
    date = new Date(1000l * lDate);
    else {
    date = null;
              } catch (Exception ex) {
              date = null;
              lastBookmark.setCreated(date);
              // last visited
              try {
    lDate = Long.parseLong((String)a.
    getAttribute("last_visit"));
    if (lDate != 0l) {
    date = new Date(1000l * lDate);
    else {
    date = null;
              } catch (Exception ex) {
              date = null;
              lastBookmark.setLastVisited(date);
              state = BOOKMARK_ENTRY;
         else if (t == HTML.Tag.H3 && lastTag == HTML.Tag.DT) {
              // new node.
              try {
              parentDate = new Date(1000l * Long.parseLong((String)a.
                                  getAttribute("add_date")));
              } catch (Exception ex) {
              parentDate = null;
              state = DIRECTORY_ENTRY;
         * Invoked when the end of a tag is encountered. If the tag is
         * a DL, this will set the node that parents are added to the current
         * nodes parent.
         public void handleEndTag(HTML.Tag t, int pos) {
         if (t == HTML.Tag.DL && parent != null) {
              parent = (BookmarkDirectory)parent.getParent();
    public static class BookmarkDirectory extends DefaultMutableTreeNode {
         /** Dates created. */
         private Date created;
         public BookmarkDirectory(String name) {
         super(name);
         public void setName(String name) {
         setUserObject(name);
         public String getName() {
         return (String)getUserObject();
         public void setCreated(Date date) {
         this.created = date;
         public Date getCreated() {
         return created;
    public static class BookmarkEntry extends DefaultMutableTreeNode {
         /** User description of the string. */
         private String name;
         /** The URL the bookmark represents. */
         private URL location;
         /** Dates the URL was last visited. */
         private Date lastVisited;
         /** Date the URL was created. */
         private Date created;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setLocation(URL location) {
         this.location = location;
         public URL getLocation() {
         return location;
         public void setLastVisited(Date date) {
         lastVisited = date;
         public Date getLastVisited() {
         return lastVisited;
         public void setCreated(Date date) {
         this.created = date;
         public Date getCreated() {
         return created;
         public String toString() {
         return getName();
    // Bookmarks.java END
    // BookmarksModel.java BEGIN
    import java.util.Date;
    public class BookmarksModel extends DynamicTreeTableModel {
    * Names of the columns.
    private static final String[] columnNames =
    { "Name", "Location", "Last Visited", "Created" };
    * Method names used to access the data to display.
    private static final String[] methodNames =
    { "getName", "getLocation", "getLastVisited","getCreated" };
    * Method names used to set the data.
    private static final String[] setterMethodNames =
    { "setName", "setLocation", "setLastVisited","setCreated" };
    private static final Class[] classes =
    { TreeTableModel.class, String.class, Date.class, Date.class };
    public BookmarksModel(Bookmarks.BookmarkDirectory root) {
         super(root, columnNames, methodNames, setterMethodNames, classes);
    public boolean isCellEditable(Object node, int column) {
         switch (column) {
         case 0:
         // Allow editing of the name, as long as not the root.
         return (node != getRoot());
         case 1:
         // Allow editing of the location, as long as not a
         // directory
         return (node instanceof Bookmarks.BookmarkEntry);
         default:
         // Don't allow editing of the date fields.
         return false;
    // BookmarksModel.java END
    // DynamicTreeTableModel.java BEGIN
    import java.lang.reflect.*;
    import javax.swing.tree.*;
    public class DynamicTreeTableModel extends AbstractTreeTableModel {
    /** Names of the columns, used for the TableModel getColumnName method. */
    private String[] columnNames;
    private String[] methodNames;
    private String[] setterMethodNames;
    /** Column classes, used for the TableModel method getColumnClass. */
    private Class[] cTypes;
    public DynamicTreeTableModel(TreeNode root, String[] columnNames,
                        String[] getterMethodNames,
                        String[] setterMethodNames,
                        Class[] cTypes) {
         super(root);
         this.columnNames = columnNames;
         this.methodNames = getterMethodNames;
         this.setterMethodNames = setterMethodNames;
         this.cTypes = cTypes;
    public int getChildCount(Object node) {
         return ((TreeNode)node).getChildCount();
    public Object getChild(Object node, int i) {
         return ((TreeNode)node).getChildAt(i);
    public boolean isLeaf(Object node) {
         return ((TreeNode)node).isLeaf();
    public int getColumnCount() {
         return columnNames.length;
    public String getColumnName(int column) {
         if (cTypes == null || column < 0 || column >= cTypes.length) {
         return null;
         return columnNames[column];
    public Class getColumnClass(int column) {
         if (cTypes == null || column < 0 || column >= cTypes.length) {
         return null;
         return cTypes[column];
    public Object getValueAt(Object node, int column) {
         try {
         Method method = node.getClass().getMethod(methodNames[column],
                                  null);
         if (method != null) {
              return method.invoke(node, null);
         catch (Throwable th) {}
         return null;
    * Returns true if there is a setter method name for column
    * <code>column</code>. This is set in the constructor.
    public boolean isCellEditable(Object node, int column) {
    return (setterMethodNames != null &&
         setterMethodNames[column] != null);
    // Note: This looks up the methods each time! This is rather inefficient;
    // it should really be changed to cache matching
    // methods/constructors
    // based on <code>node</code>'s class, and code>aValue</code>'s
    //class.
    public void setValueAt(Object aValue, Object node, int column) {
         boolean found = false;
         try {
         // We have to search through all the methods since the
         // types may not match up.
         Method[] methods = node.getClass().getMethods();
         for (int counter = methods.length - 1; counter >= 0; counter--) {
              if (methods[counter].getName().equals
              (setterMethodNames[column]) && methods[counter].
              getParameterTypes() != null && methods[counter].
              getParameterTypes().length == 1) {
              // We found a matching method
              Class param = methods[counter].getParameterTypes()[0];
              if (!param.isInstance(aValue)) {
                   // Yes, we can use the value passed in directly,
                   // no coercision is necessary!
                   if (aValue instanceof String &&
                   ((String)aValue).length() == 0) {
                   // Assume an empty string is null, this is
                   // probably bogus for here.
                   aValue = null;
                   else {
                   // Have to attempt some sort of coercision.
                   // See if the expected parameter type has
                   // a constructor that takes a String.
                   Constructor cs = param.getConstructor
                   (new Class[] { String.class });
                   if (cs != null) {
                        aValue = cs.newInstance(new Object[]
                                       { aValue });
                   else {
                        aValue = null;
              // null either means it was an empty string, or there
              // was no translation. Could potentially deal with these
              // differently.
              methods[counter].invoke(node, new Object[] { aValue });
              found = true;
              break;
         } catch (Throwable th) {
         System.out.println("exception: " + th);
         if (found) {
         // The value changed, fire an event to notify listeners.
         TreeNode parent = ((TreeNode)node).getParent();
         fireTreeNodesChanged(this, getPathToRoot(parent),
                        new int[] { getIndexOfChild(parent, node) },
                        new Object[] { node });
    public TreeNode[] getPathToRoot(TreeNode aNode) {
    return getPathToRoot(aNode, 0);
    private TreeNode[] getPathToRoot(TreeNode aNode, int depth) {
    TreeNode[] retNodes;
         // This method recurses, traversing towards the root in order
         // size the array. On the way back, it fills in the nodes,
         // starting from the root and working back to the original node.
    /* Check for null, in case someone passed in a null node, or
    they passed in an element that isn't rooted at root. */
    if(aNode == null) {
    if(depth == 0)
    return null;
    else
    retNodes = new TreeNode[depth];
    else {
    depth++;
    if(aNode == root)
    retNodes = new TreeNode[depth];
    else
    retNodes = getPathToRoot(aNode.getParent(), depth);
    retNodes[retNodes.length - depth] = aNode;
    return retNodes;
    // DynamicTreeTableModel.java END
    // IconRenderer.java BEGIN
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.tree.*;
    import javax.swing.plaf.basic.BasicTreeUI;
    class IconRenderer extends DefaultTreeCellRenderer
    // Color backColor = new Color(0xD0, 0xCC, 0xFF);
    Color backColor = new Color(0xF0, 0xF0, 0xE0);
    String tipText = "";
    JTree tree;
    int currRow = 0;
    boolean m_selected;
    JTable table;
    public IconRenderer(JTree tree, JTable table) {
    this.table = table;
    // setBackground(backColor);
    setBackground(Color.GREEN);
    setForeground(Color.black);
         this.tree = tree;
    public Component getTreeCellRendererComponent(JTree tree, Object value,
    boolean selected,
    boolean expanded, boolean leaf,
    int row, boolean hasFocus) {
         Object node = null;
         super.getTreeCellRendererComponent(
    tree, value, selected,
    expanded, leaf, row,
    hasFocus);
         TreePath treePath = tree.getPathForRow(row);
    if(treePath != null)
              node = treePath.getLastPathComponent();
    currRow = row;
    m_selected = selected;
    DefaultMutableTreeNode itc = null;
    if (node instanceof DefaultMutableTreeNode) {
    itc = (DefaultMutableTreeNode)node;
         setClosedIcon(closedIcon);
    setOpenIcon(openIcon);
    return this;
    /* Override the default to send back different strings for folders and leaves. */
    public String getToolTipText() {
    return tipText;
    * Paints the value. The background is filled based on selected.
    public void paint(Graphics g) {
         super.paint(g);
         Color bColor = null;
         if(!m_selected) {
              System.out.println(" iconren not sel currRow " + currRow);
              if(currRow % 2 == 0) {
                   bColor = Color.WHITE;
              } else {
              bColor = backColor;
         } else {
              bColor = table.getSelectionBackground();
              System.out.println("in else selbg = " + bColor);           
              bColor = new Color(0xF0, 0xCC, 0x92);
              System.out.println(" bColor aft = " + bColor);           
         int imageOffset = -1;
         if(bColor != null) {
         imageOffset = getLabelStart();
         g.setColor(bColor);
         if(!m_selected) {
              System.out.println(" not sel setting white ");
              g.setXORMode(new Color(0xFF, 0xFF, 0xFF));
         } else {
    //          g.setXORMode(new Color(0xCC, 0xCC, 0x9F));
              g.setXORMode(new Color(0x00, 0x00, 0x00));
              System.out.println(" using color = " + g.getColor());           
         if(getComponentOrientation().isLeftToRight()) {
         g.fillRect(imageOffset, 0, getWidth() - 1 - imageOffset,
                   getHeight());
         } else {
         g.fillRect(0, 0, getWidth() - 1 - imageOffset,
                   getHeight());
    private int getLabelStart() {
         Icon currentI = getIcon();
         if(currentI != null && getText() != null) {
         return currentI.getIconWidth() + Math.max(0, getIconTextGap() - 1);
         return 0;
    // IconRenderer.java END
    // IndicatorRenderer.java BEGIN
    // import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    import javax.swing.table.*;
    import javax.swing.table.*;
    import javax.swing.plaf.basic.*;
    import java.awt.event.*;
    import java.util.EventObject;
    import java.text.NumberFormat;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.StringTokenizer;
    import java.util.Arrays;
    class IndicatorRenderer extends DefaultTableCellRenderer {
    /** Makes sure the number of displayed in an internationalized
    * manner. */
    protected NumberFormat formatter;
    /** Row that is currently being painted. */
    protected int lastRow;
    protected int reloadRow;
    protected int reloadCounter;
    protected TreeTableModel treeTableModel;
    protected TreeTableModelAdapter treeTblAdapter;
    protected JTable table;
    Component renderer = null;
    Color backColor = new Color(0xF0, 0xF0, 0xE0);
    IndicatorRenderer(TreeTableModelAdapter treeTblAdapter, TreeTableModel treeTableModel) {
         setHorizontalAlignment(JLabel.RIGHT);
         setFont(new Font("serif", Font.BOLD, 12));
         this.treeTableModel = treeTableModel;
         this.treeTblAdapter = treeTblAdapter;
    * Invoked as part of DefaultTableCellRenderers implemention. Sets
    * the text of the label.
    public void setValue(Object value) {
    /* setText((value == null) ? "---" : formatter.format(value)); */
         setText((value == null) ? "---" : (String) value.toString());
    * Returns this.
    public Component getTableCellRendererComponent(JTable table,
    Object value, boolean isSelected, boolean hasFocus,
    int row, int column) {
         renderer = super.getTableCellRendererComponent(table, value, isSelected,
    hasFocus, row, column);
         lastRow = row;
         this.table = table;
              if(isSelected) {
                   doMask(hasFocus, isSelected);
              } else
              setBackground(table.getBackground());
    return renderer;
    * If the row being painted is also being reloaded this will draw
    * a little indicator.
    public void paint(Graphics g) {
         super.paint(g);
    private void doMask(boolean hasFocus, boolean selected) {
              maskBackground(hasFocus, selected);
    private void maskBackground(boolean hasFocus, boolean selected) {
              Color seed = null;
              seed = table.getSelectionBackground();
              Color color = seed;
              if (color != null) {
                   setBackground(
    new Color(0xF0, 0xCC, 0x92));
    // IndicatorRenderer.java END
    // JTreeTable.java BEGIN
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    import javax.swing.table.*;
    import java.awt.event.*;
    import java.util.EventObject;
    public class JTreeTable extends JTable {
    /** A subclass of JTree. */
    protected TreeTableCellRenderer tree;
    protected IndicatorRenderer indicatorRenderer = null;
    public JTreeTable(TreeTableModel treeTableModel) {
         super();
         // Creates the tree. It will be used as a renderer and editor.
         tree = new TreeTableCellRenderer(treeTableModel);
         TreeTableModelAdapter tdap = new TreeTableModelAdapter(treeTableModel, tree);
         // Installs a tableModel representing the visible rows in the tree.
         super.setModel(tdap);
         // Forces the JTable and JTree to share their row selection models.
         ListToTreeSelectionModelWrapper selectionWrapper = new
         ListToTreeSelectionModelWrapper();
         tree.setSelectionModel(selectionWrapper);
         setSelectionModel(selectionWrapper.getListSelectionModel());
         // Installs the tree editor renderer and editor.
         setDefaultRenderer(TreeTableModel.class, tree);
         setDefaultEditor(TreeTableModel.class, new TreeTableCellEditor());
         indicatorRenderer = new IndicatorRenderer(tdap, treeTableModel);     
         // No grid.
         setShowGrid(false);
         // No intercell spacing
         setIntercellSpacing(new Dimension(0, 0));     
         // And update the height of the trees row to match that of
         // the table.
         //if (tree.getRowHeight() < 1) {
         // Metal looks better like this.
         setRowHeight(20);
    public TableCellRenderer getCellRenderer(int row, int col) {
              if(col == 0)
              return tree;
              else
              return indicatorRenderer;     
    public void updateUI() {
         super.updateUI();
         if(tree != null) {
         tree.updateUI();
         // Do this so that the editor is referencing the current renderer
         // from the tree. The renderer can potentially change each time
         // laf changes.
         setDefaultEditor(TreeTableModel.class, new TreeTableCellEditor());
         // Use the tree's default foreground and background colors in the
         // table.
    LookAndFeel.installColorsAndFont(this, "Tree.background",
    "Tree.foreground", "Tree.font");
    public int getEditingRow() {
    return (getColumnClass(editingColumn) == TreeTableModel.class) ? -1 :
         editingRow;
    private int realEditingRow() {
         return editingRow;
    public void sizeColumnsToFit(int resizingColumn) {
         super.sizeColumnsToFit(resizingColumn);
         if (getEditingColumn() != -1 && getColumnClass(editingColumn) ==
         TreeTableModel.class) {
         Rectangle cellRect = getCellRect(realEditingRow(),
                             getEditingColumn(), false);
    Component component = getEditorComponent();
         component.setBounds(cellRect);
    component.validate();
    public void setRowHeight(int rowHeight) {
    super.setRowHeight(rowHeight);
         if (tree != null && tree.getRowHeight() != rowHeight) {
    tree.setRowHeight(getRowHeight());
    public JTree getTree() {
         return tree;
    public boolean editCellAt(int row, int column, EventObject e){
         boolean retValue = super.editCellAt(row, column, e);
         if (retValue && getColumnClass(column) == TreeTableModel.class) {
         repaint(getCellRect(row, column, false));
         return retValue;
    public class TreeTableCellRenderer extends JTree implements
         TableCellRenderer {
         /** Last table/tree row asked to renderer. */
         protected int visibleRow;
         /** Border to draw around the tree, if this is non-null, it will
         * be painted. */
         protected Border highlightBorder;
         public TreeTableCellRenderer(Tr

  • PSE 8 coloring a black and white image

    Okay, so I downloaded a free trial of PSE 8, so my experience with it is limited, which may contribute to my problem. I've watched tutorials on how to add color to a black and white photo using the paintbrush tool, though I haven't watched one for PSE 8.
    I'll make a new layer, paint part of the picture, and then add another layer. But when I click a different color to paint with, it changes the color of what I already painted, even though I'm on a different layer.
    Also when I tried to just save the image with one part painted, it didn't save it, and the image looked as it did originally.
    Any help is appreciated! Thanks!

    Hi,
    Are you using the right tool to paint on a layer?
    For coloring a black and white image, you need to save different areas of your image on a different layer and then use either Paint brush or a Paint bucket tool.
    It seems that you are selecting a wrong tool. For selecting Brush, press B.
    Then try painting on one part of the image and then go to the the color swatch present at the end of the tools panel on the left as :
    Now click on the foreground color swatch(on the top) to change the color with which you want to paint.This will not change the color of other layers on changing the color.
    Cheers
    Swarnima

  • Ugly strokes with colors on black

    I have a problem with my Ai when I use color on black, it gives a ugly lines around the object, see below :
    I zoomed in on it on the left side as you can see, some white/yellow-ish stroke comes up when I do this...very annoying and ugly!!!
    does anybody know a solution

    This is only preview in Illustrator, if you dant want this just remove Anti Aliased Artwork

Maybe you are looking for