How to do a magic wand tool like photoshop with java?

in a JPanel,a bufferedImage with a great many colors show in it.
now,i want to select a region with same color use a magic wand tool ,just like photoshop,how to do it?
Thanks.

maybe it is not a feasible way!
i have loading a image size of 150*50,
when i use getPixelColor() method as follow,it used almost 40 seconds to end it.it get correct info of every pixels,but too slow. say nothing of analysis the pixels and catch a selection.
//*******the getPixelColor() method**********//
public String getPixelColor(BufferedImage bimg){
String info=new String();
for(int i=0;i<bimg.getWidth();i++)
for(int j=0;j<bimg.getHeight();j++){
int rgb=bimg.getRGB(i,j);
int red=(rgb>>24)&0xff;
int green=(rgb>>16)&0xff;
int blue=(rgb>>8)&0xff;
info=info+"R:"+red+" G:"+green+" B:"+blue+" X:"+i+" Y:"+j+"\n";
return info;
//****end *****//
then invoke method:
System.out.println(getPixelColor(myimg));

Similar Messages

  • Is there a magic wand tool in photoshop CC 2014?

    Is there a magic wand tool in photoshop CC 2014?  I am looking for a complete method of removing a white background transparent.

    Are you familiar with how Photoshop groups tools in the toolbar?
    If you hover your mouse over any tool with a tiny black arrow in the bottom RHS of the button - then left-click and hold - the buttons grouped (not visible) under that button will appear in a dropdown menu.
    Hover over the Quick Selection tool, left click and hold and you'll see that you can then select the Magic Wand tool

  • Where is the magic wand tool in photoshop cc

    ive tried clicking on quick selection brush tool but magic wand icon not there?

    I found it, thank you

  • How can i use magic wand tool in photo-shop 7 ??

    nhmc,

    Not with a raster image, like a .jpg. You need to be more aware of the huge differences between a raster image and raster editor, and vecor graphics and a vector editor. Selecting stuff is one of the biggest difference.
    In Illustrator, you work with objects, like stacks of paper on a table. You can select individual objects anywhere on the page and on any or all layers, then transform, move, delete, fill stroke, or an infinite number of things to those objects.
    In Photoshop, when you select, you are really just creating a mask, which you can then use to restrict editing to pixels within that mask on the current layer. It's like working on a photo of a stack of paper on a  table. You can't easily move the pieces of paper around.
    It's difficult to explain in a short posting, and that's all I'm going to write tonight. If you intend to spend any time with Photoshop or Illustrator you should invest in some documentation, and I don't mean Adobe's completely insufficient on-line documentation. The Visual Quickstart series comes well recommended and scales easily to intermediate once you know your way around.

  • Where is the Magic Wand tool in Photoshop CS6?

    Desperately need it for a project I'm working on, and seeing as I'm currently going through the painful process of moving from Coral Paint Shop Pro to Photoshop this is slowing it down no end.

  • How do I make a brush signature when the tool bar is missing the magic wand tool?

    I am missing the magic wand tool from the tool bar on the left of cc.  How do I retrieve it or is it completely missing from the photoshop cc download?  I need it to make a brush signature for signing photos.

    Hi,
    Most likely the magic wand tool is not missing.
    The Magic Wand Tool is grouped with the Quick Selection Tool in the tool box
    more info on where the tools are and how to access them
    https://helpx.adobe.com/photoshop/using/tools.html
    https://helpx.adobe.com/photoshop/using/using-tools.html

  • How to shift selection of magic wand tool by 2 pixels to take the edges off?

    Hello,
    I'm trying to make a selection with the magic wand tool and shift the selection edges by a pixel or two, but the 'refine edge' button doesn't seem to do anything.  I want to cut a pixel off all the outer edge of an image I have cut out of another picture.  Any help would be great thank you.

    Depending on whether you have selected the image or the background, use  Select > Modify > Expand Selection, or Select > Modify > Contract Selection

  • How to unselect magic wand tool to select another area?

    This is so silly but it is driving me nuts.  I used to be able to select an area with the Magic Wand tool and then when I was done, click on something else and it would "deselect."  But now it doesn't do that anymore.  Did I change a setting somehow by accident or did they do an update that changed that?  I hate having to do Ctrl D to deselect it when I used to just click on something else. 

    Thanks for your help.  I actually checked on the icons where you mentioned and the one I wanted was the "new selection box"  I had "add to selection" checked and so it wouldn't unselect when I went to new area.  So your answers helped!  Thanks so much.

  • Coloring issues with magic wand tool and paint bucket tool, leaves uncolored areas near drawn lines

    Photoshop CS6 doesn't color properly.  Whetever I use brush tool or elliptical marquee tool to do the lines (with brush tool I use Hard Round, not soft), it doesn't color the whole area when i fill them with color. This happens with both magic wand tool AND paint bucket tool, there is always a small uncolored area near the lines. I have tolerance on 30,  and anti-alias, contiguous and sample all layers boxes checked. (this setting worked on my old CS3) I have tried tolerance from 0 to 100, no difference. I have also tried unchecking the boxes I just mentioned, still no difference. I hope there is a solution for this, because it is tedious to always go to the Select - Modify - Expand every time I need to color some area. So how do I fix this problem? I use seperate layers for lines and colors, like I have always done with other Photoshop versions. Even in school where they have CS5 those normal settings work.

    Hello Chris,
    I don't think this is a "user error". I think Adobe should be able to program a state of the art paint bucket, which is capable to get this done right.
    Other applications are able to get this done right.
    Please don't fall into a programmer's ignorance ("this is done right by definition") but listen to us artists and improve this unintuitive behavior. Add something like "ignore transparent pixels", because this doesn't even work if you draw on an empty layer.
    Thank you!

  • Content-aware-fill and magic-wand-tool

    Hello! I use the content-aware-fill to remove some text from a photo. To do so, I use the "Polygonal Lasso Tool", select the text with a generous border and click edit -> fill -> content-aware-fill.
    This works fine, but selecting a text with the lasso-tool is very much work. So I tried to use the magic-wand-tool - some clicks and the text is selected, very fast and fine. No applying the content-aware-fill - the text vanishes somehow, but the borders of the text are still visible. I guess you really have to select the text AND some background around it to make content-aware-fill work. But isn't there a way to do this with the magic-wand-tool? Increasing the tolerance didn't work, I would need something like "magic-wand-tool and increase the selected area +20 pixels in all directions".
    What procedure do you suggest?

    Are you trying to remove a watermark that says something like "Proof" or "Copyright"?  If so, you won't get much help here.  The best advice in that case is to actually pay for the photo.  It's surprising how many people ask for help doing illegal things.
    Please confirm you are not trying to defeat someone's copyright (e.g., post a small part of the image), and I'm sure you'll get more help.
    -Noel

  • Magic wand tool that will select broken-line shapes?

    I'm an illustrator... working in both digital & real artwork.
    I work mostly in Photoshop CS, but I have been searching for a solution to a digital problem that I can't quite seem to find using either Photoshop or Illustrator.
    What I wish to do is scan a pencil drawing and then create selected shapes in a quick and easy method using a magic wand tool.
    But it needs to be a magic wand tool that will select an area drawn from a series of broken lines. Photoshop will only select shapes that are 100% intact, so I wind up having to spend lots of time searching to repair broken lines before Photoshop selects just that one area.
    I KNOW that such a program exists... because I recall there used to be such a program. It was a free dowloaded program that I got once, way back around 1998. I think it came from Australia... and it was a basic digital paint program of some sort. I can't recall the name.
    It allowed one to quickly click and select an area from within a shape drawn with broken line segments...
    Does anyone know of any program (hopefully for Mac) that allow this sort of selection?
    This would save me hours of frustration. I can't believe Adobe hasn't come up with something like this already.
    Thanks...
    John Nez
    www.johnnez.com

    Gerno
    I doubt that I will get to trying the proposed method on that sample image this weekend. I can make a few quick comments, however.
    Like numerous Photoshop tools, the success of Illustrator tools like Live Trace and Live Paint are very image dependent and some experience helps. Here are some comment on the three steps needed.
    First, the Live Trace step must be done well. There are a boat load of parameters for this process. For the subject image my guess would be to start with a preset and the one I would choose would be comic art.
    Secondly, once you make a live paint group you have to have automatic gap detection checked (turned on) and you choice of predefined or custom gap sizes specified. You will then see where the gaps are automatically found and fixed and the gap options dialog box will tell you how many have been found. If you like what you see you can just start painting. Usually, however it is an iterative process of painting some of the areas and then resetting the gap detection and painting again. At any point you can automatically close the paths (but you cannot go back), change the settings to auto detect even larger gaps and try again.
    Third is the manual phase. If lucky you will have none of this. On the subject image, however, I can see that some of this is required. To preserve the artistic content of the original one draws a line in the very big gaps having no stroke or fill (invisible line)and then you use the live paint bucket. While the above sounds like a lot of work, it can go very quickly with many drawings.
    JN
    >That's why I think Adobe ought to work on designing a 'smart magic wand tool'... that could select imperfectly closed shapes.
    The Live Paint tool in Illustrator does this. It automatically detects gaps and lets you paint as if they were not there.
    Paulo

  • CS5 Magic Wand Tool Question

    I have a new Mac and I just got CS5. I find that the Magic Wand tool works differently than it did with CS3 on my PC.
    First, I'm used to being able to see the "marching ants" as I select the areas. In CS5/Mac they don't appear until the area is selected. Is there are setting in CS5 for the Mac that will let me do this?
    Second, the tool is refusing to select an area in the center of the image that is the same color as the background. I don't know why this is happening.
    Third, at a certain point, the tool just selects the entire image.
    And one more thing: The wand size is much larger relative to the image than it was in CS3/PC. I would like to change it, but I do not see an option to change the brush size.

    Magic wand:
    Quick selection:

  • Automatic whole object selection with lasso or magic wand tool.

    Here I have a circle pattern, all the fills are the same, all have the same appearance,
    when I try selecting all the internal scattered objects with the lasso tool, it only partially selects them, its slow getting around their borders while trying not to select the outer ring of objects, using the selection tool on this radial design is difficult, as when you select some pieces you deselect others, I was hoping for an option whereby you could tick a checkbox for the lasso or magic wand tool to "select whole object" when you run the wand or lasso over those objects.At the moment the lasso tool only partially selects based on which nodes you encircled.
    I cannot select the outer ring (would be just as difficult with selection tool) and use inverse because there are many other objects on the page also, I could have created the inner circle on another layer initially, but had not, in this situation a small enhancement to the magic wand or lasso would be good for selecting whole objects. When using experimental design approaches we don`t naturally pre plan every step or idea from the beginning.
    the other option is to select them all with lasso, the group them, move them then ungroup, but again just looking for the one step opportunity as it seems simple enough.

    Agreed. I think an "Grow" and "Grow All" option in the Select menu is the best way to achieve that. (Maybe Adobe can come up with better naming)
    "Grow selection" would increase the selection by one anchor point in each direction for each partially selected path.
    "Grow All" would select all the anchor points of each partially selected path.
    For example, if you have 1 point selected on a circle, "Grow selection" would add the 2 adjacent points to the selection for a total of 3 points. "Grow All" would select all the points on the circle.
    Another related feature would be an "Add to selection" option in addition to the "Save selection". And why not a "Substract from selection" option? You'd simply select a few points, choose add or substract and choose which saved selection to modify.
    A lot of the selection toold work at the object level, not at the point level, like Deselect/Reselect/Inverse. This can be frustrating.

  • CS Crashes upon using Magic Wand tool

    As the title says. Every time I use the magic wand tool, Photoshop CS crashes. I tried resetting the program but it didn't work. I cannot find a patch for this anywhere. Its making photoediting very difficult! Is there a patch I can download anywhere? Such an expensive program should NOT be crashing like this.

    Hi. This forum is for beginners trying to learn the basics of Photoshop.  I'm moving your question to the Photoshop General Discussion forum for specialized attention to your situation.

  • Magic Wand Tool Help, please

    This one is driving me a bit nuts.
    I work in a Hotel, and use a lot of company logos for display purposes on our 40inch screens (modulex), I work mostly with black backgrounds, as it looks better.
    Ok, on my other laptop , i have photoshop 7 and if i choose a logo like the one's below for example, i just drag the logo into photoshop 7.
    I don't want the red background or the white one, and on many other logos i don't want the background either, so all i do in photoshop 7 is use the magic wand tool & it automatically cuts it out, apart from the bits in the O's, As etc.
    EASY!!!
    However on my new laptop with photoshop CS5, i follow the same method, but the magic wand tool selects the whole image.
    Any ideas?
    Thanks in advance.
    http://www.google.com/imgres?q=virgin+logo&um=1&hl=en&sa=N&biw=836&bih=524&tbm=isch&tbnid= Rlf_ELD-F1Af6M:&imgrefurl=http://www.blackberrycool.com/2008/07/16/canadas-virgin-mobile-b ringing-the-blackberry-8130/&docid=HwHccRimHf3HKM&imgurl=http://www.blackberrycool.com/wp- content/uploads/virgin_mobile_logo.gif&w=600&h=343&ei=cbTkTt6bK8bi8AOO1dDnAw&zoom=1&iact=r c&dur=473&sig=105667737518328952790&page=1&tbnh=90&tbnw=157&start=0&ndsp=8&ved=1t:429,r:6, s:0&tx=125&ty=36
    http://www.google.com/imgres?q=ba+logo&um=1&hl=en&sa=N&biw=836&bih=524&tbm=isch&tbnid=En6G j_81YAwKyM:&imgrefurl=http://www.indiaassociation.co.uk/walk_sponsorssupporters.php&docid= jG5vG114dNvL1M&imgurl=http://www.indiaassociation.co.uk/userfiles/image/logos/ba%252520cor p.jpg&w=1779&h=527&ei=ArbkTpOWK4Sv8gPGyfWmDA&zoom=1&iact=hc&vpx=38&vpy=205&dur=1777&hovh=1 22&hovw=413&tx=295&ty=72&sig=105667737518328952790&page=1&tbnh=62&tbnw=209&start=0&ndsp=7& ved=1t:429,r:0,s:0

    What he meant was, in Photoshop, choose Edit - Preferences - Performance and see if the [  ] Enable OpenGL Drawing box is checked.
    If you do choose to change this setting to see if it makes any difference, remember to close and restart Photoshop before testing, and remember to turn it back on again after if it doesn't help with the problem.  This page describes what OpenGL does for you:
    http://kb2.adobe.com/cps/405/kb405745.html
    -Noel

Maybe you are looking for