Colour and Black & White Images

Hello,
I was just wondering about how can i classify or check if:
an image is colour or black and white?
Thank you very much for your help.

Couple of ideas....
Some graphic file formats give the number of
colours.
if that is 2, then it's a monochrome picture
But I think the real question you're asking is, how
can I tell if an image is
grey scale.
You'd have to go through each pixel in the image, and
check.
When specifying colours in RGB, grey colours are
easy enough to check.
Eg.
( 0, 0, 0 ), ( 100, 100, 100 ), ( 148, 148, 148
)..... ( 255, 255, 255 )
So, if I'm correct.... the following function would
check a single pixel....
public boolean isGreyScale ( Colour aPixelColour )
int r = aPixelColour.getRed();
int g = aPixelColour.getGreen();
int b = aPixelColour.getBlue();
if ( ( r == g ) && ( g = b ) )
return ( true );
else
return ( false );
}regards,
OwenThe problem is that my program is a image searcher tool.
I have a large number of images and i need a good searching technique. If i have to go through each pixel in every image, it will take too long for an effective application.
thank you very much for your help

Similar Messages

  • MacBook - Black & white image on TV

    Please can somebody help with connecting my MacBook to a Sony trinitron TV
    I have a new MacBook and I'm using the following set up to connect to a 5 year old Sony TV -
    Apple mini-DVI to video converter into S-video lead connected to S-video to SCART adaptor - problem is that I only get a black & white image.
    Can anybody help = please?
    13" white MacBook   Mac OS X (10.4.9)  

    Hi essman,
    As S-Video cables send their chroma (colour) and luminance (brightness) signals separately it sounds as though the problem may be found either in your S-Video cable or in one of the S-Video connectors. If only the luminance pins/wire was working correctly your video signal would appear to be in black and white.
    To ensure that the SCART adapter is not the problem however I would recommend testing with a composite video cable (also known as an RCA.) With that cable the entire video signal is sent over the one pin, so you either get video or you don't. If over that connection it's still black and white, I would say the blame lies with the SCART adapter.
    Hope this helps!
    Jason

  • Preview displays pdfs with distorted colours and thin white line on the border

    Preview Version 7.0 (826.4) on 10.9.5 displays pdfs with cmyk images in it in distorted colours and thin white line on the border of the page despite in the original .indd file the image runs into bleed. The display errors aren't present in acrobat reader 10.1.12 or acrobat pro 9.3.4. Any idea? Thanks

    You can use one of these extensions to set a default font size and page zoom on web pages:
    * Default FullZoom Level: https://addons.mozilla.org/firefox/addon/default-fullzoom-level/
    * NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/

  • Setting up Colour and Black and White in one document

    I hope this is a stupid question. I am creating the school year book for the first time. It is 80 pages with a mixture of black and white pages and colour pages.
    Do I have to set Indesign up any special way so that when it goes to the printers it will know this.
    Can I have black and white masters and colour masters in the one document?
    Do I need to gray scale all my (black and white images) in Photoshop first?
    Do I need to do anything to the text to make it print in Black and white if I am using a black coloured font???
    Thank you for your help.............it is greatly appreciated

    >Do I have to set Indesign up any special way so that when it goes to the printers it will know this.
    Maybe. How is it going to be printed? Have you talked to the printer about it?
    >Can I have black and white masters and colour masters in the one document?
    In a sense, yes. ALL pages in ID are color pages, but you can certainly set up masters where the only color used is Black.
    >Do I need to gray scale all my (black and white images) in Photoshop first?
    InDesign CS6 introduced export to grayscale PDFs, but that turns everything in the PDF to grayscale so you would need to export your color pages separately from the grayscale pages, then recombine in Acrobat pro, or send to the printer in separate files. You also need to set your Appearance of Black settings (in the prefs) to Output All Blacks as Rich Blacks if you are going to export to grayscale or your black type will be screened to a dark gray. Personally, I'd do the conversions in Photoshop so you can see and control what is going to happen and avoid the export hassles.
    Grayscale content is output in the K channel of the InDesign file, and your screen preview may not be accurate unless you use overprint preview.
    >Do I need to do anything to the text to make it print in Black and white if I am using a black coloured font?
    Your text will print in whatever color is you choose for it. If you use the default [Black] swatch, it will output using only black ink.

  • Camera Raw and Black & White Pictures

    I am using Potoshop Elements 7.0 and I just downloaded the latest camera raw (5.2). However, both with the old and new camera raw plug when I import black & white pictures from my Nikon D80 in NEF format I see them as colour pictures in the PSE organizer. How can I keep the original format (black and white in this case) while importing the pictures?

    Your images are indeed color pictures. That's their original format. When you think you're shooting B&W, the camera built-in software just adds a flag for the camera manufacturer's raw converter to render them as B&W. ACR (Adobe Camera Raw) ignores that flag and leaves it up to you to convert the images to B&W through the method of your choice.

  • Black & White images

    Hi everyone,
    to explain what I'm doing first.
    I am creating a bi-monthly magazine for a club, the magazine is printed in black & white with greyscale images, with a colour cover spread.
    This magazine also appears on the clubs website in full color.
    So my question is, can I create the whole magazine on inDesign in full color, then export it as a PDF in full color for the website.  Then export a second copy as a PDF with the color cover spread and internal pages in black & white/grey scale.
    As I don't want to have to make the whole magazine in colour, export it, then make all the changes to the images in photoshop.
    Any help would be much appreciated.

    You can make the magazine in full colour and export to PDF, giving you a full colour.
    You can then use Acrobat to Convert the PDF to Grayscale (save as a new name) and that can be your black and white version.
    There is no way using File>Export to get a Grayscale PDF from InDesign.
    To get a grayscale PDF from InDesign you would need to use File>Print and print directly to a PDF OR to postscript (then use acrobat distiller to distill the PS file). But printing to PDF is frowned upon by many.
    Besides, a simple conversion of colour images to grayscale is kind of bland. When you convert a colour image to grayscale you always almost nearly always need to change the levels/curves and shadow and highlight/contrast for a meatier looking b/w image.
    But you can make the conversion to Grayscale in the PDF as said earlier http://www.google.ie/search?q=pdf+to+grayscale&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-U S:official&client=firefox-a

  • How to find out Black white Image??

    Hi All,
    I am Prashant I have bunch of images in one folder form the bunch of images I want to find out color images and black and white images. Can u help me plz????
    Thanking you
    Prashnat

    Hi, Actuallu I tried this code but I got following error "Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!"
    even if I minimize image size but it shows me same error...
    import java.io.*;
    import java.awt.*;
    import javax.imageio.ImageIO;
    import java.awt.image.BufferedImage;
    public class GetPixelColor
      public static void main(String args[]) throws IOException{
        File file= new File("C:\\LVII-176_01_l.jpg");
        BufferedImage image = ImageIO.read(file);
        // Getting pixel color by position x=100 and y=40
        int height=image.getHeight();
        int width=image.getWidth();
        System.out.println("Height=>"+height);
        System.out.println("width=>"+width);
       // int clr=  image.getRGB(height,width);
        int clr=  image.getRGB(width,height);
        int  red   = (clr & 0x00ff0000) >> 16;
        int  green = (clr & 0x0000ff00) >> 8;
        int  blue  =  clr & 0x000000ff;
        System.out.println("Red Color value = "+ red);
        System.out.println("Green Color value = "+ green);
        System.out.println("Blue Color value = "+ blue);
    }

  • How to keyframe from colour to black & white

    I am trying to do a video from present then moved to the past. So I am starting a clip from colour, then slowly it turns into black & white.
    I have 2 questions:
    1) How do I keyframe the above effects ?
    2) Instead of using the Sepia effect, is there other effects to make the video black & white ?
    Thanks

    Tom Wolsky wrote:
    Use the desaturate filter. Open the clip with the filter applied into the viewer and in the Filters tab keyframe the values from to go from 0 up to 100 to be fully black and white.
    Thanks Tom, it works !!

  • Mixing Color and Black & White

    Does anyone know how to produce a monchrome photo with a little bit of color in it.
    i.e. A picture of a bride at a wedding holding a bouquet of roses. I want the whole picture monchrome with just the roses being colored red.
    Please point me in the right direction
    Regards,
    Mark McKnight
    http://www.digital-photography-tricks.com

    That's a great idea and with the right photo it can give a really good effect. Use adjustment layers just like silkrooster is saying. Here's a tutorial of using the adjustment layers (black & white effect). You should get your answer there.
    http://tv.adobe.com/watch/photoshop-for-video/black-white-adjustment-layers

  • My powermac G5 will only print in one colour and black, how do i fix this?

    Please help...
    my mac is only printing in one colour - blue, and black. My partner's dyslexia tutor changed some settings "somewhere" as the black ink was running low and my partner had his finals coming up and didn't have time to get a new black cartridge. So his coursework printed in blue, to save black ink, but we can't get it back to normal to print any photo's etc. I remember seeing a colour wheel but don't know anymore ......

    Might have been an idea to tell us what printer this is.
    And to get some new cartridges.

  • Have just tried to replace TESCO colour and black and white ink cartridges for a model 2540.

    Each time I get the same error message 'incompatable older generation  ink cartridge'.  Contacted TESCO help desk and they sent a pair of cartridges direct to me.......the latest ones they have in stock............................same error message............does this mean that in future NO Tesco ink cartridge will ever be able to be used on a 2540 printer, or is this a way of getting me to buy HP cartridges at twice the cost? 

    Hi AlanAtkinson,
    Welcome to the HP Forums.
    I see that you are getting an error that deals with the ink cartridges.
    Please click on the following link that deals with An 'Older Cartridge' Message Displays on the Control Panel or the Computer.
    I have also located a document that deals with A 'Used or Counterfeit Cartridge Detected' or 'Counterfeit Cartridge Advisory' Message Displays on t....
    If the troubleshooting does not help resolve your issue, I would then suggest calling HP's Technical Support to see about further options for you. If you are calling within North America, the number is 1-800-474-6836 and for all other regions, click here: click here.
    Thanks for your time.
    Cheers,  
    Click the “Kudos Thumbs Up" at the bottom of this post to say “Thanks” for helping!
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    W a t e r b o y 71
    I work on behalf of HP

  • Colourizing a black/white photo

    Is there any way to put some colour in a black and white photo?

    Switch mode to RGB or CMYK
    Make a new layer on top, and set blending mode to color and begin to paint. If the color is too bright set the opacity of the layer to something less than 100%.

  • How do I work a Black & White image so White stays white & black becomes transparent

    My situation (note white border is part of image and must remain white)  I want to place that image (a QR Code) over photos so the white remains to define the code and the black parts become transparent so the color of the image (that I place this QR code over) will be the actual code color instead of black :-O
    someone just doing it for me would be nice HOWEVER I Really want to learn how to do it my self as I have more to do :-)
      Thank You  ............  Dennis

    Is it me or…why would anyone use photoshop for this process?
    place your QR code image over another image and select both and make it an opacity mask
    Then make it an inverted opacity mask
    Or place it over a white rectangle closed path filled with white and make it a simple uninverted opacity mask
    The actual selected masked arts bounding boxes are not showing but they are selected.
    James Talamage has pointed out on several occasions that an image can be used as an opacity mask.
    As I have done here.

  • Changing background/text colours to black/white

    Hi,
    Got a mate who has just bought a shuffle, and downloaded Itunes. Problem is due to problem he has with his sight, he can only see text on the PC when the background is black, and text is black, hence the reason for getting a shuffle (no screen) . Is it possible to change the background/text settings on Itunes to switch them around? He has many other software on the laptop where the colours are changed, but Itunes, amongst some other Lotus appls, cannot change. Any ideas anyone, this will stop him using his Shuffle, and have to sell it if he can't see the Itunes software properly.
    Cheers
    Andy

    hi Andy!
    this is not anything that i've ever looked into before ... my
    b guess
    is that it may be possible to customise the displays using the itunes for Windows software developers kits:
    http://developer.apple.com/sdk/
    ... or it might also be possible to enlist the help of one of the SDK gurus to get a display plug-in written for your friend.
    I don't see much action from the SDK people here, but i recall seeing more activity on the various matters over in "using itunes". if you don't get any more replies from here over the next couple of days, maybe try reposting over there?
    love, b

  • Script to frame multiple designs in various colours and save each image.

    I sell prints online, and have a template of a frame, but I would like to know if there is a script which can be used to input maybe 10 image files into the frame template, and save each file as its own jpeg.
    Hope that makes sense.
    Thanks

    Brilliant thank you, so how do I now use the below in PS (I am on CS5)
    thanks again for your help
    // replace smart object’s content and save psd;
    // 2011, use it at your own risk;
    #target photoshop
    if (app.documents.length > 0) {
    var myDocument = app.activeDocument;
    var theName= myDocument.name.match(/(.*)\.[^\.]+$/)[1];
    var thePath = myDocument.path;
    var theLayer = myDocument.activeLayer;
    // psd options;
    psdOpts = new PhotoshopSaveOptions();
    psdOpts.embedColorProfile = true;
    psdOpts.alphaChannels = true;
    psdOpts.layers = true;
    psdOpts.spotColors = true;
    // check if layer is smart object;
    if (theLayer.kind != "LayerKind.SMARTOBJECT") {alert ("selected layer is not a smart object")}
    else {
    // select files;
    if ($.os.search(/windows/i) != -1) {var theFiles = File.openDialog ("please select files", "*.psd;*.tif;*.jpg", true)}
    else {var theFiles = File.openDialog ("please select files", getFiles, true)};
    if (theFiles) {
    // work through the array;
              for (var m = 0; m < theFiles.length; m++) {
    // replace smart object;
                        theLayer = replaceContents (theFiles[m], theLayer);
                        var theNewName = theFiles[m].name.match(/(.*)\.[^\.]+$/)[1];
    //save jpg;
                        myDocument.saveAs((new File(thePath+"/"+theName+"_"+theNewName+".psd")),psdOpts,true);
    ////// get psds, tifs and jpgs from files //////
    function getFiles (theFile) {
         if (theFile.name.match(/\.(psd|tif)$/i) != null || theFile.constructor.name == "Folder") {
              return true
    ////// replace contents //////
    function replaceContents (newFile, theSO) {
    app.activeDocument.activeLayer = theSO;
    // =======================================================
    var idplacedLayerReplaceContents = stringIDToTypeID( "placedLayerReplaceContents" );
        var desc3 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
        desc3.putPath( idnull, new File( newFile ) );
        var idPgNm = charIDToTypeID( "PgNm" );
        desc3.putInteger( idPgNm, 1 );
    executeAction( idplacedLayerReplaceContents, desc3, DialogModes.NO );
    return app.activeDocument.activeLayer

Maybe you are looking for

  • Premiere Pro 2.0 - AME Won't open!

    Hello. Trying to export simple small AVI file to Quicktime. Premiere Pro 2.0, Windows XP, etc. 1st two attempts: Export/Adobe Media Encoder, chose Quicktime format. Encountered some kind of problem, error: Invalid profile file!  I think this is an au

  • Must declare the Scalar variable *@prompt*.. (IES 10901)".

    Hi, I am getting an error: "Database error Must declare the Scalar variable *@prompt*.. (IES 10901)". backend: SQLServer The dim, Lovs are valid in IDT universe. There is a Fiscal Year Month Dim in Universe=SELECT   cast(convert(varchar(6),DATEADD (Y

  • Delete production order reservations

    Hi SAP GURU, we have reservations open for process order and the order is marked for deletion. We are not able to display that order, but we can veiw that order in table. so can you please suggest how to cancel/ delete the order reservation. Thanks,

  • BT Vision activation issue

    We ordered Phone, Broadband and BTVision on the 13th December. This was all fine initially but then we were told our broadband/BT Vision order had been cancelled and will need to be re-ordered when our phone line has been activated (on 22nd December)

  • Captivate 5 not rendering large exe files properly

    Have imported large swf files into Captivate % (with seperate .wav files for audio). They all synch on the timeline at 24fps. for each slide. They look great in preview and when published to .exe they look fine on some computers. But we have encounte