Is the number of histogram pixels the same for each channel within each layer?

Dear Photoshop Scripting Forum:
I have written a script to isolate the number histogram pixels for each channel within each layer of a file.
However, I have found some unexpected results: That, the number of pixels is the same for each channel within each layer.
For example,
  Layer 1 has 18,979 pixels by itself, and so does each channel within it (Red, Green, and Blue)
  Layer 1, Channel Red, has 18,979 pixels
  Layer 1, Channel Green, has 18,979 pixels
  Layer 1, Channel Blue, has 18,979 pixels.
This does not seem right to me.
Does someone else have the same experience, or knowledge of something else?
I am wondering if there is a bug in my script.
If need be, I will post the script, but it's kind of long for a forum.
Thank you.

The following is for RGB 8bit images.
The red historgram is an array of red values of the pixels that range from 0 to 255. Each element in the array has the number of pixels that have that red value. So for example if you had a layer that is pure red 255,0,0 all the pixels would be in the 255 element and there would be no pixels in the other elements. The red historgam still has the same number of pixels as the layer. They are just all in one histogram element( they all have the same value ).
But even if you know that all the pixels in a layer are all in the last element(255) of the red histogram you still don't know the color of the pixels. A white pixel has a red value of 255. So does a yellow, magenta, etc pixel. If you only know the red value of a pixel the pixel could be one of over 65000 colors. Most of which would not be considerd 'red'
It is the three channels together that detemine a pixel's color. Unless the layer is one color you can not tell the color of the pixels from looking at the histogram.
Unless you use the color range selection then get the histogram of the selection. Even then you need to decide what color value make up 'red'

Similar Messages

  • Typed search bar entries are the same for each tab. How can I keep new searches different in each tab without retyping?

    How do I associate typed search bar entries specifically with the current tab only?
    Currently, when I type an entry into the search bar it shows up in the search box of every tab open. If I switch to a different tab, there it is. I want to switch tabs and be able to have my last search in that tab still appear, not the typed entry of a prior tab appear. Because when I switch back to a different tab I want to be able to resume with that search without retyping it each time.

    Use the about:home page or the Google website to do searches if you want separated search bars.<br />
    The search bar on the Navigation Toolbar is part of the user interface and is the same in all tabs in a specific window.<br />
    You can open separate windows if you want a different search bar on the Navigation Toolbar or use the location bar to search.

  • How to keep the page size the same for each page

    Hi All ~
    Every time I open up FireFox or and any other page after opening up FireFox, I have to enlarge the page size. How can I get it where the page size stays the same size from page to page?

    Also see this Add-on:
    *Default FullZoom Level: https://addons.mozilla.org/en-US/firefox/addon/default-fullzoom-level/
    <br />
    <br />
    '''You need to update the following.''' The Plugin version(s) shown below was/were submitted with your question and is/are out of date. You should update to avoid known security issues with the version(s) you have installed. Click on "More system info..." to the right of your question to see what was included with your question.
    *Next Generation Java Plug-in 1.6.0_24 for Mozilla browsers
    #'''''Check your plugin versions''''' on either of the following links':
    #*http://www.mozilla.com/en-US/plugincheck/
    #*https://www-trunk.stage.mozilla.com/en-US/plugincheck/
    #*'''Note: plugin check page does not have information on all plugin versions'''
    #*There are plugin specific testing links available from this page:
    #**http://kb.mozillazine.org/Testing_plugins
    #'''Update the [[Java]] plugin''' to the latest version.
    #*Download site: http://www.oracle.com/technetwork/java/javase/downloads/index.html (Java Platform: Download JRE)
    #**'''''Be sure to <u>un-check the Yahoo Toolbar</u> option during the install if you do not want it installed.
    #*Also see "Manual Update" in this article to update from the Java Control Panel in Windows Control Panel: http://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox#Updates
    #* Removing old versions (if needed): http://www.java.com/en/download/faq/remove_olderversions.xml
    #* Remove multiple Java Console extensions (if needed): http://kb.mozillazine.org/Firefox_:_FAQs_:_Install_Java#Multiple_Java_Console_extensions
    #*Java Test: http://www.java.com/en/download/help/testvm.xml

  • How do I make my Catalog Settings stay the same for each new Catalog I create?

    How to you set a default Catalog Settings parameter that is different from what the Adobe engineers have set us with?
    I have 30" monitors here, so I want the standard preview size of every new catalog to be set to 2048 pixels.
    I redundantly back up my catalogs via two different layers of hardware mirroring, so 'no' I don't want prompted once a week when I open one of various catalogs if I want to backup right then.
    I have 50+ Terabytes of removable mirrored hard drive space, with individual project libraries that feed into 1.5TB master removable disk libraries, so I'd like to, by default, NEVER discard 1:1 previews, at least until Lightroom gets about 2000% faster in rendering them on the fly.
    This is of hot topic for me since I just noticed Lightroom had been discarding 1:1 previews that I had spent large amounts of time creating just over a month ago as I've begun transitioning my archives from Aperture to LIghtroom.  At any point, I'll maybe have access to only 1/15th of the actual DNG's in my catalog because they're offline, so keeping full sized previews of archived files is extremely important for my workflow.

    John,
    That's simple & perfect.
    thank you.

  • IS RAM installation the same for all new iMacs?

    I want to remove the 4GB RAM from my 20" iMac (early 2008) and switch it for 2GB RAM from new 3.06 24" iMac. Is the technique the same for each computer?

    Go to Crucial <http://www.crucial.com/store/listproductline.aspx?cat=ram&mfr=apple&submit=go> and find which Macs you have on their listings. That will tell you what RAM is in each.
    If both are 800 MHz SDRAM, then they might be of similar configurations and could be swapped.

  • How do i keep the addons the same for different users on my xp pc? (without re-installing them for each one)

    windowsXP. I have several different user accounts on the pc. How do I make firefox the same for each user profile (instead of having to install new plugins for each user)?

    http://kb.mozillazine.org/Installing_extensions#Global_installation -
    The information provided here about command line global installation is not applicable to Firefox 3.6+ versions, the code for that particular command line parameter was removed.
    You can still do a "global installation" of extensions by placing the XPI package in the \Program Files\Firefox\extensions\ folder, when Firefox is closed. As each Profile is launched the extension will be installed in that Profile.

  • I have a license for Creative Suite CS3 and bought an upgrade for CS5 a few years later. Would the original serial number for CS3 be the same for my CS5 version?

    I have a license for Creative Suite CS3 and bought an upgrade for CS5 a few years later. Would the original serial number for CS3 be the same for my CS5 version?

    No... if you do not have CS3 installed, you will enter your CS3 serial number when asked for proof of a qualifying product... and then you will enter your different CS5 serial number... every version, new or upgrade, has a unique serial number

  • Wanting to deactivate PS Elements on Mac and transfer program to a friend. Is it OK to download a trial to my friend's Mac and use my serial number.  Also is the serial number the same for Mac and Win versions?  Many thanks.

    Wanting to deactivate PS Elements on Mac and transfer program to a friend. Is it OK to download a trial to my friend's Mac and use my serial number.  Also is the serial number the same for Mac and Win versions?  Many thanks.

    Yes it should work transferring PSE10 from Mac to Mac. There is a download link below for PSE10, which your friend could use. There is a formal licence transfer process but it’s not necessary for your friend to register the product (activation is sufficient) although he couldn’t benefit from future upgrade pricing without registration. Serial numbers typically can only be registered one time.
    Boxed versions of PSE are normally multi-platform with disks for both Windows and Mac; so the serial number is the same. Downloads have tended to be single platform only although I believe the current version PSE12 will work on both Windows and Mac with the same serial number – boxed or download.
    http://helpx.adobe.com/photoshop-elements/kb/photoshop-elements-10-11-downloads.html

  • "Material is not the same for confirmation and delivery"

    Hello
    If this is not the right forum, my apologies. Direct me to the correct one if it is not ....
    Have been doing automated test development (HP's QTP) against SAP systems for over a year. I am not an application expert - very much a newbie when it comes to application knowledge but trying to gain some. I have "googled" the phase "Material is not the same for confirmation and delivery" and have not been able to find any references. What does this mean?
    I see this message for an iDoc using WE02. Have looked and looked but don't really know what I'm looking for.
    Clues?
    Thanks,
    DW

    DW,
    I have never seen that exact message, but I have seen similar ones.  Generically, the message probably means that you are attempting to perform a transaction against a document (perhaps a Purchase order?) and the Material number (Part Number) contained in the transaction is not the same as the Material number in the originating document in SAP.
    An example might be you have previously created a confirmation against a Purchase order, which now exists in SAP.  This Confirmation is for a specific Purchase order, item, and material.  Now, when you attempt to create an inbound delivery for the Confirmation, the material number contained in the new IDOC is different from the material number that was contained in the original Confirmation.
    I don't know what IDOC Message type you are having the problem with, but generically you can do some troubleshooting. Find the SAP Material number in the IDOC (MATNR probably).  Find the appropriate reference document number in the IDOC (confirmation number?  Purchase order number? or...?), and then manually review the document in SAP to ensure that the Material numbers are the same.
    If you are totally lost, you should really consult with an SAP App expert.  I am guessing that this is part of the Materials Management module, so you would be asking for an MM expert.
    Or, you can send more details, and we can try to help.
    What is the IDOC message type?
    What is the Message number of the error message?  Functionally, what is this IDOC trying to do, from a business perspective?
    Rgds,
    DB49

  • Converting a VBScript for Exchange 2003 to Function the same for Exchange 2010

    Converting a VBScript for Exchange 2003 to Function the same for Exchange 2010
    Afternoon;
    I've run into a problem at this time.  We are currently looking into migrating from Exchange 2003 into Exchange 2010 and I'm finding that my normal data collection method is no longer usable in Exchange 2010.  I have the script posted below as of
    what I'm currently using to collect my information, I just need to know of a means to continue the collection when we move to the new Exchange server.  Any assistance in getting this to function with Exchange 2010 would be great.
    ++++++++++++++++++++++++++++++++++++++++++++++++++
    ++++++++++++++++++++++++++++++++++++++++++++++++++
    On Error Resume Next
    'Date Stamp for File Name
    Function TIMESTAMP
      strDate = CDate(Date)
      strDay = DatePart("d", strDate)
      strMonth = DatePart("m", strDate)
      strYear = DatePart("yyyy", strDate)
      If strDay < 10 Then
        strDay = "0" & strDay
      End If
      If strMonth < 10 Then
        strMonth = "0" & strMonth
      End If
      TIMESTAMP = strYear & strMonth & strDay
    End Function
    'Drop Location Vars Set
    DRP01 = 1
    DRP02 = 1
    'Live Check SQL04
    strVIC = "SQL04"
    Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
    Set colItems = objWMIService.ExecQuery ("Select * from Win32_PingStatus Where Address = '" & strVIC & "'")
    For Each objItem in colItems
        DRP01 = objItem.StatusCode
    Next
    'Live Check FS02
    strVIC = "FS02"
    Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
    Set colItems = objWMIService.ExecQuery ("Select * from Win32_PingStatus Where Address = '" & strVIC & "'")
    For Each objItem in colItems
        DRP02 = objItem.StatusCode
    Next
    'Setup STOREDIR Location
    If DRP01 = 0 Then
        STOREDIR = "\\SQL04\Email\Collected\" 'Primary Data Storage Location
        Else
        If DRP02 = 0 Then
            STOREDIR = "\\FS02\Shared\MIS\Daniel\" 'Secondary Data Storage Location
            Else
            STOREDIR = "C:\Scripts\Logs\" 'Tertiary Data Storage Location
        End If
    End If
    'STOREDIR Check for Availability
    Set fso = CreateObject("Scripting.FileSystemObject")
    If fso.FolderExists(STOREDIR) Then
        AVAIL = 1
        Else
        AVAIL = 0
    End If
    'Sets Failsafe STOREDIR
    If AVAIL = 0 Then
        STOREDIR = "C:\Scripts\" 'Last Chance DIR for Data Files
    End If
    'Sets Filename
    FILENAME = TIMESTAMP & ".csv"
    'Testing Purposes Only
    'wscript.echo TIMESTAMP
    'wscript.echo STOREDIR & vbNewLine & FILENAME & vbnewline & vbnewline & AVAIL
    'Sets Process Variables
    cComputerName = "EXCH02" ' Exchange Server Name or IP Address
    DIM fso, ObjFile
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set ObjFile = fso.CreateTextFile(STOREDIR & FILENAME, True)
    'ObjFile.WriteLine("Date,Display Name,Size(KB)")
    Const cWMINameSpace = "root/MicrosoftExchangeV2"
    Const cWMIInstance = "Exchange_Mailbox"
    Dim strWinMgmts            
    Dim objWMIExchange   
    Dim listExchange_Mailboxs  
    Dim objExchange_Mailbox           
    strWinMgmts = "winmgmts:{impersonationLevel=impersonate}!//" & cComputerName &"/" & cWMINameSpace
    Set objWMIExchange =  GetObject(strWinMgmts)
    'Checks for Email Record and Records to File
    If Err.Number <> 0 Then
      ObjFile.WriteLine("ERROR:" & VBNEWLINE & Err.Number & VBNEWLINE & Err.Description)
    Else
      Set listExchange_Mailboxs = objWMIExchange.InstancesOf(cWMIInstance)
      If (listExchange_Mailboxs.count > 0) Then
        For Each objExchange_Mailbox in listExchange_Mailboxs
           ObjFile.WriteLine(TIMESTAMP & "," & objExchange_Mailbox.MailboxDisplayName & "," & objExchange_Mailbox.Size)
        Next
      Else
        ObjFile.WriteLine("WARNING: No Exchange_Mailbox instances were returned.")
      End If
    End If
    ObjFile.Close
    VBScript is what I prefer. All scripts must have a kill switch to manage them from a primary location. Mine, is an updater method.
    VBScript is what I prefer. All scripts must have a kill switch to manage them from a primary location. Mine, is an updater method.

    Okay, then what about an alternative for getting the same result. The file associated in the article is too much.  All we need is something simple for a single exchange server with 180 users.  We only need to pull UserName and DataSize(KB).
    I only need to collect two pieces of information from the exchange server and the third piece is forced due to the date of when the information was collected.  This way I can sort and filter by Date and Name to see a trend of the users mailbox usage
    size.
    Every day this runs, it determines the date of the file which is also the first piece, then pulls from the exchange server the entire list of users (the second piece), and then the respective user's mailbox size in KB (the third piece).  This all is
    dropped into a CSV file later used to import into a database before being archived, done by a second task on the server.  Later used by a shared Excel PowerPivot document among the department.
    Those of us in the server admin group use this to, at a glance, see the collective size of email usage on the server.  Mainly used as a means of catching an incident before it happens.  We are currently keeping our users around a collective 80GB
    of use out of the well received limit of 110GB on Exchange 2003 and limiting the user's ability to send and receive email by email quota is apparently not accepted for us to do.  So we use this to determine who we need to visit and force archive their
    email so the server doesn't fail due to the size limit.
    VBScript is what I prefer. All scripts must have a kill switch to manage them from a primary location. Mine, is an updater method.

  • Clicked on Mac when ordering, paid for it but it says "Windows " on the download page. Is this still the same for mac?

    Clicked on Mac when ordering, paid for it but it says "Windows " on the download page. Is this still the same for mac?

    Hi Richard,
    We are sorry for the trouble,
    I have sent you an email with the correct serial number.
    Please reply once you get it.
    Thanks
    Sandeep

  • My macbook pro's screen display has suddenly gone into a strange colour setting where everything appears in a kind of infrared colour palette an I can;t seem to change it back.  It's the same for all icon and websites, does anyone know how to restore?

    My macbook pro's screen display has suddenly gone into a strange colour setting where everything appears in a kind of infrared colour palette an I can;t seem to change it back.  It's the same for all icon and websites, does anyone know how to restore?

    Wow!  I think I had this same issue just last night.
    I was cleaning my macbook pro retina on the outside.  Then I opened it up and was wiping dust off the monitor and I can't pinpoint exactly when, but the colors changed suddenly.  It looked super strange, it was like green halo's and it looked worse when looking at it at an angle.  Of course I took no pictures!!!  I was freaking out that my 2 grand laptop was busted and I somehow removed a protective film or something.
    But I digress...  The image looked very green and spacey, it was almost a neat effect.  After about 5 minutes it started to look a little more digital though.  There were straight lines of this halo effect on the edges and top.  After about 10 minutes it turned into a predominate issue with the blacks on screen.  I could open a web browser and it was unnoticable on a white background.  After about 15 minutes, you could only barely see the green cloud effect if you looked at the monitor from an extreme angle.  After about 20 minutes, it was completely back to normal, I almost feel paranoid like I see a halo or something strange.  But I believe that might be all in my head now.
    So yerp, lemme know what you guys figure out.

  • We have developed a desktop application using Flash software and published the same for MAC environment. When we double click on the index.app file, the application is working perfectly in Mac 10.6.7 at our office. But if the same index.app file is double

    We have developed a desktop application using Flash software and published the same for MAC environment. When we double click on the index.app file, the application is working perfectly in Mac 10.6.7 at our office. But if the same index.app file is double clicked in Mac 10.6.7 at out clients location, its not opening. For your information the client is able to open this same application by double clicking on index.swf file. The main problem is that client is not able to open the application using index.app file at their office whereas we are able to do so at our office. Can anyone give some suggestions to sort this problem?

    The most common reason is different versions of Flash, or different versions of web browsers used.  Some users may elect to not have Flash installed at all because of the processor overhead of Flash.  If you are going to make an application for a client, check what operating system and browser versions they are using first.  Then determine if a stand alone application is required, or if they have the necessary plugins to run specific browser enhanced code.
    P.S. MAC is an acronym for Media Access Control.  Mac is the shorthand for Macintosh, the operating system and computers made by Apple Inc.

  • I have multiple devices backed up to the same computer each with different data. how do i keep them from syncing all data when i back up or transfer stuff from the computer to a device?

    i have multiple devices backed up to the same computer each with different data. how do i keep them from syncing all data when i back up or transfer stuff from the computer to a device? one is an iphone 6 and the others are ipad mini first gens, each ipad has 64gb and the iphone has 128, need to keep the data seperate as they are not all mine

    Itunes content and pics are NOT part of the backup that itunes performs.
    Backing up, updating, and restoring iPad, iPod touch, and iPhone software
    You should transfer any purchases from iphone regularly:  File>Transfer Purchases  , if they fail to be transferred when you sync.
    You buy one and only one download.  It is your responsibility to move/copy/backup your purchases.
    You can try contacting itunes support and asking for an exception, but they are under no obligation to allow.
    http://www.apple.com/support/itunes

  • Creating a Master virtual hard disk and using the same for all other VM's

    Hi,
    We would like to create a master virtual hard disk and use the same for all other VM's. Can we do that ?
    my requirements :
    1) create 10 VM's
    2) first create a master virtual hard disk with win OS and use the same to create the 10 VM's.
    3) After creating the VM's change the HDD size.
                  -- if i have created master virtual disk with 500GB , and use the same for creating a virtual machine. can we change the HDD size to 1TB ?
    After creating the VM's ,i will change the system names and activate the windows accordingly.
    Will there be any implications ,if we can/will do like this.
    Thanks.

    Hi Suren424,
    I think Using Differencing Disks may cover your needs .
    Please refer to following setps:
       "Create the Parent Virtual Machine Configuration and Virtual Hard Disk
        Install the Operating System, updates, and common software
        Generalize the installation
        Prepare the parent virtual hard disk
        Create the differencing disks
        Create virtual machines that use the differencing disks
    For details please refer to follwing link:
    http://social.technet.microsoft.com/wiki/contents/articles/1393.hyper-v-virtual-machine-vm-parent-child-configuration-using-differencing-disks.aspx
    Hope this helps
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

Maybe you are looking for

  • How do I reconvert a pdf back to its original format?

    Hello All, Something strange has taken place when I either download a pdf from the Web, or create a pdf for one of my own proprietary files.  Instead of becoming a regular pdf with the Adobe icon, they become a pdf in Illustrator format, with an AI i

  • How can I ask MBP to use a specific router in my office?

    Here is the situation. My office is using lot of access point to create a wireless network environment. I think all of the wireless router is connected by cable to the main server in office. Most of them are G mode by one of it is N mode. I would lik

  • Could someone help me with this code??

    Hi!, I am really poor at Java, and was given this piece of code to fix. I have no idea why this compiles but does not run and have never dealt with packages either, so I would really appreciate it if someone could tell me what I could do to fix it!!

  • Can I use/convert Flash *.fla sources to Flex sources?

    I have an older project with a *.fla source file. Can I use this old Flash source in Flex SDK resp. Flex builder too? Do I have to convert this *.fla source in advance? Peter

  • GRC AC 10 - Defining sub processes

    We are in the process of implementing AC 10 and need to define the Business and sub processes for the role creation methodology and to upload the existing roles into AC Role management tool. The issue is we have only Business process defined for our