Change Image Colors

i have a MacBook1,1 running Snow Leopard 10.6.8. I would like to be able to change an images specific color. Lets say I have an image with only blue and black and I want to change the blue to green. Is there any app that does that?
Thank you in advance,
Eric

You get the colors with Image.getRGB(). You can then separate the channels with bitwise ands:
int[] pixels = new int[width * height];
img.getRGB(pixels,0,width,0,0,width,height);
int onePixel = pixels[0];
int blue = onePixel & 0xff;
int green = (onePixel & 0xff00) >> 8;
int red = (onePixel & 0xff0000) >> 16;
int alpha = (onePixel & 0xff000000) >> 24;You manipulate the channels like you see fit, then you recreate the pixel with bitwise ors, and use Image.createRGBImage() to create the new manipulated image:
int newPixel = (alpha << 24) | (red << 16) | (green << 8) | blue;
Image manipulated = Image.createRGBImage(newPixels,width,height,true);shmoove

Similar Messages

  • Change image color -- black and white

    Hello,
    I have an image that is black and white, and I want to color parts of it with a brush. However, when I try to change the color, it won't change -- it jsut changes to a different shade of grey! What can I do?
    //Tyler

    Neither black nor white are colors so you have to use other techniques.  Here is one way http://www.howtogeek.com/howto/42066/how-to-colorize-black-and-white-vintage-photographs-i n-photoshop/

  • ID CS3 - Cannot change image color (imported using "Place")

    Hello. I'm using ID CS3, Windows XP, SP3.
    I am new to ID CS3, coming from PageMaker 6.5, and when I converted one of our brochures, everything looked great. In fact, we have some images that are tif's (I think this means it's a bitmap). The images are black and white (they are apples). Our print process is Black and a Spot Color, so the apple images are the spot color.
    The converted PageMaker6.5 apples are great, they are the spot color, and when I change the spot color, they change too. If I add a new apple image through the Place command, even the exact same file, it imports as black and white, not with the spot color. In PageMaker6.5, this is how it worked, and then I would select the image and then select the spot color. In CS3, when I select the image, and select the color, it either colors the stroke or fill. Obviously I don't want the stroke, and the fill doesn't affect the apple, only the white behind the apple, so I end up with a still black apple on a colored background in the rest of the frame.
    What I want is:
    Background: Paper or None
    Apple: Spot Color (at this point, any color would be fine)
    I have tried applying styles, object/character/paragraph, I have tried the Object->Image Color Setting as found on Adobe help area, except this option is grayed out. I have tried Place, and while selecting the file, selecting "Show Import Options" but it grays out all options when the pop-up box appears. I can't figure out what else to do.
    Also, I can't change the PageMaker6.5 apples to any other color, they are stuck on spot color.
    The problem seems to be I am not targeting the black part of the image itself, yet I can not figure out how to do so. The images are made in Photoshop 6. Thank you for any help you can give (I also have an import jpg file, which has the exact problem of any color changes are to the white background (fill) or the stroke. But again I am unable to change the black part of the image).

    Thanks, in an odd way it worked...
    I dragged like you said. The entire frame became the Spot Color (meaning I could no longer see anything but a large solid block of Green). So I went to Edit->Undo, and it undid the large solid block of green, leaving the previously black image now green, exactly what I wanted. While I don't understand why the Undo command fixed it, I'm happy with the results.
    Thanks.
    Edit - I did it again to another apple, this time it worked perfectly without the undo command. The first time, my cursor became a hand. The second time, it stayed an arrow with a small block under it. Regardless of what happened the first time, thanks again.

  • How to change Image color like Channel mixer

    Hello everybody
    I have this problem can anyone help me:
    I want to change Channel mixer color,
    for example, change original Image color to B&W.
    My code:
    docRef.channels[0].color.rgb.red = 30;
    docRef.channels[0].color.rgb.green = 59;
    docRef.channels[0].color.rgb.blue = 11;
    docRef.channels[1].color.rgb.red = 30;
    docRef.channels[1].color.rgb.green = 59;
    docRef.channels[1].color.rgb.blue = 11;
    docRef.channels[2].color.rgb.red = 30;
    docRef.channels[2].color.rgb.green = 59;
    docRef.channels[2].color.rgb.blue = 11;
    But not working in scripting, seems a mistake.
    How should I correct this code? Thank you for your help.

    Hi Michael,
    I try changed 12 parameters in array of num in my js,
    doc.layers[0].mixChannels([[30,59,11,0],[30,59,11,0],[30,59,11,0]],false);
    doc.layers[0].mixChannels([[30,59,11,0]],true); ------  this way is better than ↑
    doc.layers[0].mixChannels([[60,30,10,0],[30,10,60,0],[10,60,30,0]],false);
    doc.layers[0].mixChannels([[39,77,19,0],[35,69,17,0],[27,53,13,0]],false);
    They would show new color as I wantted,
    I forgot ' When monochrome = true, the maximum number of channel value specifications is 1. '
    Thank you for your recommendation.

  • Change image color in a PDF

    I have a form that is intended for use with OCR software. What's shown should be in a light red color that the scanner won't pick up, allowing it to process just the information provided on the form.
    The problem is that, when printed, the red letters and lines are too dark, so the scanner doesn't ignore them as it should.
    I would like to use Acrobat Pro 9 to lighten the color, but I'm not having any luck figuring out how to do that. I'm not even sure if I have the right tool for the job.

    In old school image capturing, red is the equivilant of black - it is a wavelength spectrum issue (?), and always picked up.
    Blue - specifically light blue is never picked up.
    I do not know the image scanning capture process, what colors reproduce and not...
    Acrobat would not be the best tool however. Within Acrobat Pro you are able (to a limited degree) to select objects and images and open them for editing in the OS default for the type of image selected:
    - If you select a vector object, Acrobat would open the object in Illustrator (or the default OS application associatied with vector images?)
    - If you select a raster/pixel based object, Acrobat would open the object in Photoshop (or the default OS application associatied with raster/pixel based images?)
    Edits are made outside of Acrobat, saved, and Acrobat updates within.
    How is this material printed? IMO, changes should be made in the authoring program before the document is a final pdf.

  • Weird dual monitor problem with changing image colors

    I have dual monitors, same brand and type, same color settings and adjustments, and so far image was the same on both of them. Nothing regarding monitors or color preferences I have changed, but suddenly I started having this weird problem. Example:
    1. Here is the screenshot. I have pure red image, palettes and layers panel are on the second monitor.
    2. I start dragging image window to the other monitor and STILL HOLDING the mouse button (like I said, dragging)
    3. And when I release the mouse color suddenly changes.
    If I pick window and drag again color returns to normal. As soon as I release the mouse color changes.
    This is only happening on second monitor.
    I re-installed graphic drivers, and also re-installed Photoshop CC 2014.
    I also changed settings so the image both monitors show is the same (duplicate screen in windows) and there is no problem then. If I return to extended display problems FIXES. But as soon as I lock the computer, and login again the problem shows up again.
    Any ideas what should I do or how to fix it?

    I see your using Window have two displays.  I not sure how windows handle profiles for both displays.  Your displays are the the same models.  My Displays are physically about the same size  bothe 16:9. One displays 1920x1080 pixels the other 1360 x 768 so the resolution are quite different requires me to create special wallpaper. to make sean looks seamless or image on have the same composition.
    I notice that when I drag a window between displays a size difference but the color consistent. When I release the mouse button I see a color shift and a screen capture  shows this. And if I drag the split  window the cole os once again consistent.   I think what we are seeing is more a Windows thing not a Photoshop thing. 
    I'm using Windows 7 and CC 2014.  I do notice my window drags over the toolbar and under the pallets on the second display. Your window drags under your toolbar.

  • Change image color behind JButton

    Hi!
    I have a JPanel with an image on it. Over this I have added transparent JButtons to get image map functionality. When the mouse is moved over the button, the border is changed and they are clickable. But I want more functionality, I want to mark buttons that have been selected by changing the background color but I still want the image to show through the button. I.e. I want to change the white color on the image behind the button to another color. Is there a way to do this?
    /Malin

    Thank you!
    I had managed to miss the possibility to set the alpha value when setting the color.
    /Malin

  • How do I change a color to another in a bitmapData image?

    Let's say you have an image of a cartoon human that is wearing a blue jacket with white sleeves, blue shoes, and grey pants. Brown hair and biege skin tone.
    (My project actually has 1300 of these images - 325 are blue cloths, 325 are red cloths, 325 are green cloths, and 325 are purple cloths)
    I am having a major problem with file size and memory usage due to all the images, so I have been asked to see if there was a way I could programmatically change the clothing color... this way we can use any color we want, and only have 325 base images.
    I have been trying to play with color matrix filter and color transform, but I can't seem to get the hang of it
    Is there a way I can extract only the "blue" colors from the image and do a hue shift on it to the color that I want it to be without effecting the non-blue colors?
    My idea was something along the lines of:
    Copy the "blue" color channel, hue shift it, then merge it back into frame....

    Oh boy... this seems to be an issue with your manager wanting it done 'NOW' rather than 'CORRECTLY'.
    For my original statement to work, the clothing would have to be seperated from the people - as per your suggestion to them - which would make your lives a whole lot easier.  The problem with hue shifting the entire image is --> it will hue shift the entier image = all colors, and that may not be the best solution in your situation.
    I would suggest replacing the pixel color (eg. getPixel32 and setPixel32 for the size of the image) but it seems that the shoulders and shoes have a darker color tone than the rest of the body.
    Secondary solution:
    Import one of the image into Flash and do a bitmap trace of the image. 
    Seperate the clothes and people there. 
    Add the clothes as a new movie clip and change the color on a few frames 5 or so different colors (so its not too much work)
    Show them an example of how 'easy' it is to change the colors CORRECTLY when the images are seperate (even in the same file)
    The secondary will give them the 'all in one file' they requested... and also give you solid grounds for convincing them to change the graphics.
    Hope this helps.  Other wise... its a long not so nice solution which will go over budget because they did not plan for this before they made the graphics.

  • How can I change the color of interactive image label box background.

    Interactive image labels are a bit overwhelming in appearance. Can I change the label background color or make it partially transparent? I have tried several things and looked this up on Lynda.com training but no info.

    don't know how much this might help but you can change some colors using the Inspector as follows:
    from the text menu you can control paragraph and character colors, from the text menu you can control the text color.
    hope this helps...

  • How can I change a color of an image without affecting the texture, but based on a pantone pick?

    Here is an image of a paintbrush stroke that shows the texture of the paint.  I want to change the color to a specific pantone green in order to match a specific color pallet.  Rather than just using hue saturation to "guess" at the color (no pantone number), is there a way I can actually set a base color without losing the texture?

    You can only use the picker values as a guide on an image with many tones.
    I presume you are going to print as cmyk, so find the mix of the target colour and make a 'solid colour' adjustment layer and choose that mix. Then set the adj layer properties to 'hue' which should do it.
    Otherwise, add a 'hue/saturation' layer (and click on colorize in the adj layer palette) and move the slider to suit.
    If you convert to greyscale, you could colorize the pic with the spot colour too.

  • Placing images in Illustrator changes their color values-Why?

    I've been placing photoshop tiff files into Illustrator, and doing this seems to change the color values, when I sample them with the eyedropper tool. The images I made use a custom mix of CMYK rich black, with the K set to 100. In Illustrator, they appear to revert to the default 'Photoshop black", approx C75 M68 Y67 K90. This is not my intent of C70 M60 Y58 K100. The Illustrator document is CMYK mode, and I don't know why this is happening. The non-image items (vectors) in my illustrator file DO retain the color values I intended, however.
    Is this some kind of setting I can change in Illustrator? Will this discrepancy show up when this file goes to print? Please help! Thanks.

    WHen the image is not embedded, Illustrator samples the representation values. Those are handled by color management.

  • Can you change the color of an image without changing it in photoshop first?

    I have created a link for Indesign using Photoshop. It is basically a plain black graphic that is placed over an aerial to highlight the represented water. It is possible to change the color of this graphic without actually going back into photoshop?

    Another option is to make a path around the image, so that you have a vector shape with full control over fill and transparency.
    You can do the path in Ps, save as clipping path, bring into InD, position, convert clipping path to frame, select and delete content, fill, fade...
    It may be easier to do the path in InD, but perhaps accurate positioning over the area you're after would be an issue.

  • How do I change the colors of this image?

    I want to change the color scheme of this image, not just re-color it one color.  I have the original file, this is just the shutterstock preview image. I'm a beginner with Illustrator.
    Any tips would be much appreciated! Thanks

    Select it, and click the Recolor Artwork button in the Options Bar.

  • How can I change the colors of this image?

    I want to change the color scheme of this image, not just re-color it one color.  I have the original file, this is just the shutterstock preview image.
    Any tips would be much appreciated! Thanks

    colored image like this one, the Hue/Saturation function can be used to alter specific ranges of colors.  For example, altering the Hue and Saturation of Cyans and Yellows...
    -Noel

  • How do I change the color of an image

    I have some photos that I would like to change the color of, so that I can have the same image in multiple colors. How do I do this using Photoshop CS4?

    Using a Solid Color Layer set to the Blend Mode Color is one of several options in general …
    But maybe you could post a screenshot and elaborate one what you are trying to achieve.

Maybe you are looking for