Detect images in grayscale that were saved as RGB?

Anyone know, or have a script that could help with the following problem:

I have a bunch of images (in thousands) that are black and white levels, but who have been registered as RGB images. That is to say. they should really only have 1 channel, but have 3 identical channels. I must be able to detect these images and reduce them up to single channel images.

Any help would be appreciated.

Thank you!

var ColourMode = app.activeDocument.mode;
if( ColourMode == 'DocumentMode.RGB' ){
     alert( ColourMode );
}

Tags: Photoshop

Similar Questions

  • If I change my Firefox browser rather that Internet Explorer, I've always will have access to my files that were saved using IE? Please an answer non-techie.

    I received notice that my browser (IE) is obsolete and will be soon be unsupported. All of my files have been saved in Internet Explorer, and I'm afraid I won't be able to access it if I change to another browser, but I'll soon lose access to them in any case, I guess. Is this true? Do you have any suggestions? I am a person without a lot of tech knowledge please answer using the no-tech language.
    I may answer since my person tech is my daughter who may have questions or slower information.

    Thank you.

    Yes, you will still have access to your files even if they have been saved through IE.

  • How do I retrieve personal data that were lost due to the restoration of Windows 7

    Hello

    I use Samsung laptop computer with Windows 7 (Home edition) running on it, and recently I restored my Windows using the built-in Restore tool Samsung earlier restore point.

    I have had 2 drives IE C: and D: drive. Previously, windows has been installed in the C: drive and I kept my n drive D: personal data. After the successful restoration I don't see my personal data in the D: drive and I see that all drive C: files were copied on the D: drive (C: all files on the system disc such as Program FIles, windows, Documents, and settings etc.) and new windows were installed in drive C :

    I can't see any of my personal files and folder and I would like to get them back because they were very important to me.

    Can someone help me how do to recover my files and personal files that were saved in the D: drive earlier?

    Any help would be much appreciated.

    Thank you!

    Kind regards

    Pankaj

    I want to get them back because they were very important to me.

    You can probably resolved problem, but doing so through this forum is not realistic. You ask a computer-savvy friend to help you by looking at your machine or giving him access to your machine remotely. You should also check your philosophy of backup. Having very important files without an external backup is a contradiction, that you have to solve.

  • Unable to defragment error: (C) defragmentation has been abandoned because of contradictions that were detected in the filestem. Please run CHKDSK or SCANDISK on (C) to fix theses inconsistansies

    Original title: error Defragmenter

    Whenever I try to defragment I get a message saying the following... to come (C) defragmentation has been abandoned because of contradictions that were detected in the filestem. Please run CHKDSK or SCANDISK on (C) to fix theses inconsistansies. Then run disk fragmenteur.

    It may be something to do with Microsoft because it says I don't have add on, but I don't know
    I have windows XP, if that helps.
    E-mail address is removed from the privacy *.
    Thank you very much

    Hi IainFisher,

    Thanks for posting in Microsoft Communities. Of the description of problem I can understand that you are not able to run disk defragment. Provide the following information to understand the issue:

    ·         Did you do changes on the computer before the show?

    ·         Reason why you want to run disk defragment?

    Follow these methods.

    Method 1: Follow the steps in the article.

    How to defragment your disk Volumes in Windows XP

    Method 2: Follow the steps in the article to run the check disk for errors.

    How to perform disk error checking in Windows XP

    Note: If bad sectors are found in the hard drive, then it could try to fix this particular sector. If you have any data on that, it can get lost.

    I hope this helps.

    Thank you.

  • will be all my files get saved or new that were created after the death of this drive?

    I'm in Windows 8.  I had an external drive that I had put in place to save on file history.   This drive is dead.  I have since bought a new and I'm setting up historical files to copy to the disc.  He asked me if I would like to move files to this player of the former.  Of course, I can't.  He's dead.  I said no and it seemed to go.

    My question is: are all my files get saved or new that were created after the death of this drive?

    If she's not aging files saved on it, how can I get all my files copied?

    Hi Becky,

    Please contact Microsoft Community,

    As you have said that your return to the history of files on external Drive that got crashed, and then you bought a new external drive and set up again for the backup.

    I want to tell you that unfortunately, it will only back up recent files that you created on the new drive. Steps to recover old files is not possible that the backup was created on the external pilot who already got crashed.

    To learn more details of the history files, please see the link:

    https://TechNet.Microsoft.com/en-us/magazine/dn448546.aspx

    Hope this information helps. Feel free to contact us again for assistance.

  • I was told that I have to disable my account from my PC to add to another computer... I've done it before and I lost many of my images that were on LR.  No matter WHAT HELP with this please

    I'm trying to load another computer with CC, I was told that I have to disable my PC mine.  I did once before and lost a lot of my images from LR, suggestions on this please.

    I do the LR back ups system too.

    Thank you very much

    PAM

    Hi goaliemom

    There is no way to disable CC products. When you enable a CC product on another computer, simply connect to Creative Cloud.CC will ask you if you it will activate on more than 2 computers.

    I've done it before and I lost many of my images that were on LR.  No matter WHAT HELP with this please

    On the computer on which you will see that your images are not displayed?

    Catalog check the most recently used file > open recent in Lightroom

    Try opening a recent backup made on your newly added computer

    ~ Assani

  • webpageviews were saved by 3.5 tab and listed dropdown box with the arrow (was on the right side of the forward/back buttons), I can get that back?

    Whenever I changed or open a new tab in Firefox 3.5 tab remember all the pages that were visited in this tab and show a drop-down list when I click on the small arrow next to the forward/back buttons.

    When I switched tabs the dropdown would show the pages that I used to get to the page in the second tab.
    
    Now all tabs have their history lumped together in 1 place and I have no idea how I got to many of the places I find.
    

    Make a right click the back or next button, and then select the page you want.

  • Convert an image to grayscale 10-bit color

    Hi all

    I am a programmer of experience of labview 8 years, but new to the procession of the image or NOR-Vision. And now, I came to a problem with the conversion of the image.

    I have an image acquisition card that acquires 1 k * 1 k 10-bit grayscale image, I saved the image acquired in *.raw (binary) format, and now I have to convert these images to bmp (jpeg, png, or diff) format. When I try to use the VI "Imaq save 2", I got an error saying something like "unsupported image type. After searching this forum, it seems that if I have to use an image of color type save as bmp format, but to receive my 10-bit RAW files, I first need to create an image in grayscale U16. So, how can I solve this problem?

    Thanks for your suggestions!

    My guess: you're referring to the 'writing IMAQ 2.VI of the file' as I do not know everything "IMAQ save...". Screw.

    The 'writing IMAQ 2.VI of the file' does not support writing 16-bit BMP.  You can take this information among image types supported this VI, see here.  Look at the pictures above, the designation of VI: 'IMAQ writing file BMP 2' says that he accepts "U8" and "RGB32 image types.

    Proposal: Write a PNG image.

  • where can I find all my photos that were stored on adobe photoshop 10?

    where can I find all my photos that were stored on photoshop 10?

    your photos have probably saved in photoshop but not in photoshop. Photoshop is the name of a program from adobe.  It stores any image files.

    but the question is not where your images were saved from, but they were in this directory/file saved.

    to find the directory/folder where you saved your image files, open PES 10, click on file and click on save as...

    a panel of Tacker system opens and which will show you where your image files are saved.

    Alternatively, you can search for your image files by using the search function of your operating system (windows in os win Explorer) and the mac os finder.

    If your find this confusing info, ask someone as computer help you.  This is a pretty basic business that doesn't require significant computer skills.

  • When I click on an image or map that is Kijiji real estate pages, open Firefox all crunched on the right side of the page. How can I fix this?

    When I click on an image or map that is Kijiji real estate pages, open Firefox all crunched on the right side of the page. How can I fix this?
    For example, I discovered an apartment ad that has various attached photos. It said click on the images to see an enlarged version. FF opens the page however the majority of the page is white and the image seems to be pushed on the right side of the page and watch as if it were bundled up against the right side shows is not the whole picture.
    What can I do to fix this?

    Thanks Cor - el,
    Just set the police minimum votes to zero, did the trick. However, I also appreciate other suggestions that I'm following now. Non-strabisme already installed. A little more difficult to find this file user.js. It any suggestions?
    Thanks again for your great help.
    See you soon,.
    Robert

  • Windows XP crashed all I have is the Mozilla folder that I saved. How can I return bookmarks etc.?

    I got a Root/System32/Hal.dll error so XP went I had saved the folder of Mozilla firefox and thuderbird folder when I knew that I was losing the system. How can I get my favorites return. I can not find a profile folder in the firefox folder.

    You can also find tips on creating a bootable CD or other image of recovery that will allow you to copy files without having to repair Windows hard disk. Once again, probably out of the scope of what you can get on this forum.

  • I've upgraded to the new firefoc but now I can't find all the useful stuff that were there as inages. Where did you hide these?

    Yep, I kept receiving system messages that my firefox browser has been exceeded that I needed to upgrade to the latest version and I finally did.

    But now, all very practical features to display until the present time I open firefox all which are parties. For example IMAGES. Where they were hidden and how do I access it?

    I have to say that I prefer the look and feel of Firefox before the upgrade.
    Features that users use often does not have to be hidden - who likes to click on the buttons as before arriving at what should be readily available?

    Versions of Firefox 4 + use a new build-in home page named Subject: House with a Google search bar on this issue (no internet access required for the loading of this page).

    What about: home page only shows a few clips and has a button to restore the previous session, as appropriate.

    If you want a home with extras page, and then set a different page than the homepage like www.google.com such as used in versions of Firefox 3.

  • Convert an image to grayscale in C

    Hello. I want to convert an image, acquired by webcam, grayscale in C, using myRIO. I have a webcam connected to myRIO, working on simple image acquisition, but I can't find a way to convert the image to grayscale. I get no error to the building or a run Configuration.

    It's the image is written in the file: (black)

    The code is here:



    #include "MyRio.h".

    #define CAM_NAME 'cam1 '.
    #define CAPTURED_IMAGE_PATH ".» "/ capturedImage4.png".

    #define WINDOW_NUMBER 15 / / number of Image display window
    #define IMAQDX_ERROR_MESSAGE_LENGTH 256

    bool Log_Vision_Error (int valeurerreur);
    bool Log_Imaqdx_Error (IMAQdxError valeurerreur);

    int main (int argc, char * argv)
    {
    #if 1
    Status of NiFpga_Status;

    printf ("\n + ImageAcquisitionAndDisplayExample \n");

    Image * captureImage = NULL;
    Image * processedImage;

    Session IMAQdxSession = 0;
    /*
    * Open the myRIO NiFpga Session.
    * This function MUST be called before all other functions. After this call
    * is complete the myRIO target will be ready to be used.
    */
    status = MyRio_Open();
    If (MyRio_IsNotSuccess (status))
    {
    return the situation;
    }

    Create the Image buffer
    captureImage = imaqCreateImage (IMAQ_IMAGE_HSL, 0);
    processedImage = imaqCreateImage (IMAQ_IMAGE_HSL, 0);
    imaqSetImageSize (processedImage, 640, 480);

    Log on to the selected camera
    If (Log_Imaqdx_Error (IMAQdxOpenCamera (CAM_NAME, IMAQdxCameraControlModeController, & session)))
    Goto cleanup;

    Acquire an image
    If (Log_Imaqdx_Error (IMAQdxSnap (session, captureImage)))
    Goto cleanup;

    Process the image Captured here.
    Grayscale

    If (Log_Imaqdx_Error (imaqExtractColorPlanes (captureImage, 1, NULL, NULL, processedImage)))
    Goto cleanup;

    Write the image captured in the file
    Log_Vision_Error (imaqWriteVisionFile (processedImage, CAPTURED_IMAGE_PATH, NULL));

    cleaning:
    Log out of camera
    IMAQdxCloseCamera (session);

    Have the image
    imaqDispose (captureImage);
    imaqDispose (processedImage);

    printf ("\n--ImageAcquisitionAndDisplayExample \n");
    return 0;

    status = MyRio_Close();
    #endif
    }

    bool Log_Imaqdx_Error (IMAQdxError valeurerreur)
    {
    If {(valeurerreur)
    errorText tank [IMAQDX_ERROR_MESSAGE_LENGTH];
    IMAQdxGetErrorString (valeurerreur, errorText, IMAQDX_ERROR_MESSAGE_LENGTH);
    printf ("%s \n", errorText);
    Returns true;
    }
    Returns false;
    }

    Print the VISION Error Message
    bool Log_Vision_Error (int valeurerreur)
    {
    If ((valeurerreur! = TRUE) & (imaqGetLastError()! = ERR_SUCCESS)) {}
    char * tempErrorText = imaqGetErrorText (imaqGetLastError ());
    printf ("%s \n", tempErrorText);
    imaqDispose (tempErrorText);
    Returns true;
    }
    Returns false;
    }

    BoKnows wrote:

    Does not include the LabVIEW code you posted anything to send the image to a file.  I'm curious to know if we run out of questions at this point.  If we comment out code to convert grayscale, writing original image to the file properly or you didn't post in events where you say it works?

    I guess that LabVIEW code, you have published work to complete the task.  It's a little different from what I posted.  But I am not too concerned about that as long as things are working.

    The code works now. The problem is there:

    If (Log_Imaqdx_Error(imaqExtractColorPlanes (captureImage, 1, NULL, NULL, processedImage)))

    Instead of Log_Imaqdx_Error, it must be Log_Vision_Error.

  • I have about 530 jpegs that were the records to progressive JPEG, and I need to save them all to standard baseline JPEG.  How to do all this without recording them one by one?

    I have about 530 jpegs that were the records to progressive JPEG, and I need to save them all to standard baseline JPEG.  How to do all this without recording them one by one?

    Hi Rachel

    Go file > Scripts > Image Processor which opens this Panel

    It will be easier if you put all the images in a folder, you can select this folder and all the files it contains batch. The numbered sections are in the order you need to follow, so nice an easy.  Don't forget to assign a location record well, or you might struggle to find their.

    An alternative, FI you re using Windows is Irfanview.   It has more options than the Image Processor, but maybe it's a little harder to use.

    http://www.IrfanView.com/

    Good luck

  • Is there a way to detect all the keys that the user clicked in AS3?

    Hi all

    Quick question - is there a way to detect all the keys that the user clicked using the AS3 code? I have pimples on my project and I want to that they be disabled once the user has clicked on it, but I wonder if there is a function that I can write that will automatically disable all keys that the user clicked once?

    Thank you!

    Here is an example where the buttons share the same handler... try it and see if it works (I can't due to not having Flash on hand).  The only problem that I could expect it not to love the evt.currentTarget is not identifiable as a particular class type, but sometimes it can't.  If this is the case there is an easy solution.

    Btn1.addEventListener (MouseEvent.CLICK, processBtnClick);

    btn2.addEventListener (MouseEvent.CLICK, processBtnClick);

    function processBtnClick(evt:MouseEvent):void {}

    evt.currentTarget.removeEventListener (MouseEvent.CLICK, processBtnClick)

    }

    If you also want to keep track of which buttons were clicked already you can store in an array...

    var clickedButtons:Array = new Array();

    Btn1.addEventListener (MouseEvent.CLICK, processBtnClick);

    btn2.addEventListener (MouseEvent.CLICK, processBtnClick);

    function processBtnClick(evt:MouseEvent):void {}

    evt.currentTarget.removeEventListener (MouseEvent.CLICK, processBtnClick)

    clickedButtons.push (evt.currentTarget)

    }

Maybe you are looking for