Photoshop windows: Co-ordinates of each selected pixel

Hi,
I am using photoshop version sc3. After selecting pixels of a certain colour, is it possible to gain the co-ordinates of each selected pixel? Is this possible through using a script?

Post your question in the 'Adobe Photoshop Developers (SDK)' forum.

Similar Messages

  • Co-ordinates of selected pixels

    Hi,
    After selecting a group of pixels, is it possible to find out the co-ordinates of each pixel? I would also like to transfer these co-ordinates into another programme, is it possible to represent the co-ordinates in a script?

    A filter can look at the selection in the form of a mask channel, so it's trivial to enumerate the pixels. Check SDK doc and sample code.

  • Open images in the Photoshop window look pixelated, but same images in Acrobat or viewer look fine. Help in resolving? Link to screenshots.

    Some files and images I open in the Photoshop window look pixelated or choppy, but when I open in Acrobat or viewer they look fine. This just started about two weeks ago. I reset my settings, and all of the the help topics come up for blurry images/re-sizing. I have had this problem with .tiff, jpg, and pdf files.
    Thank you!!
    Photoshop CS6 Ver.13.0.1x64
    Windows 7 Professional Intel(R) Core(TM) i5-3340M CPU @ 2.70GHz
    AMD (ATI) FirePro M6000 (FireGL V) Mobility Pro Graphics
    PROBLEM SAMPLE
    Photshop_Screenshot_PDF
    Same_Image_Acrobat

    That black degradation in the background at the top looks like an old ATI driver bug where if for a given pixel the red channel reaches zero all three colors of the pixel would go black.  I think that was a couple of years ago we were seeing that.
    See if AMD has released newer drivers for your FirePro card.
    -Noel

  • Draw line between black pixel : coordinates of selected pixels ?

    Hi
    I want to build a script which can check a Photoshop file and :
    - find black pixel
    - for each black pixel, look for another black pixel within maximum distance of 5 pixels
    - then draw a line between the two black pixels.
    I wrote this script below (my first script ...), but it's VERY slow (and my final image is VERY big), I think because I test the colour for each pixel of the image.
    So another solution would be to first select black pixel with magic wand, then the script save all coordinates of selected pixels, then my script wil test only this pixels (less than 1% of the pixels are black in my image).
    Is it possible with JavaScript ?
    Thank you for your response !
    Marc
    function main(){
    var startRulerUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    var myHeight = app.activeDocument.height;
    var myWidth = app.activeDocument.width;
    // Find black pixel
    for(var i=5; i<myWidth; i++) {
      for(var j=5; j<myHeight; j++) {
       activeDocument.colorSamplers.removeAll()
       var sampler = activeDocument.colorSamplers.add([new UnitValue (i, 'px'), new UnitValue (j, 'px')]);
       if (sampler.color.rgb.hexValue === "000000") {
    // For each black pixel, search another black pixel below left up to 5 pixels
        for (var m=i-5; m<i; m++) {
         for (var n=j+1; n<j+5; n++) {
          activeDocument.colorSamplers.removeAll()
          var test = activeDocument.colorSamplers.add([new UnitValue (m, 'px'), new UnitValue (n, 'px')]);
          if (test.color.rgb.hexValue === "000000") {
    // Then draw a black line between the two black pixels
           var FillColour = new SolidColor;
           FillColour.rgb.hexValue = '000000';
           var ad=activeDocument;
           ad.selection.select([[m,n],[i,j],[m,n+1],[i,j+1]], SelectionType.REPLACE, 0, true);
           ad.selection.fill(FillColour);
           ad.selection.deselect()
    // For each black pixel, search another black pixel below right up to 5 pixels
         for (var m=i+1; m<i+5; m++) {
          for (var n=j; n<j+5; n++) {
           activeDocument.colorSamplers.removeAll()
           var test = activeDocument.colorSamplers.add([new UnitValue (m, 'px'), new UnitValue (n, 'px')]);
           if (test.color.rgb.hexValue === "000000") {
    // Then draw a black line between the two black pixels
            var FillColour = new SolidColor;
            FillColour.rgb.hexValue = '000000';
            var ad=activeDocument;
            ad.selection.select([[i,j],[m,n],[m,n+1],[i,j+1]], SelectionType.REPLACE, 0, true);
            ad.selection.fill(FillColour);
            ad.selection.deselect()
    main();

    The first alert should have shown the first pathPoint.anchors for all the subPaths in the path.
    The xyArray is just something I added for the alerts. The array 'myPathInfo' should have all the info extracted from the path.
    myPathInfo.length will tell you how many subPaths are in the Path.
    myPathInfo[index].entireSubPath.length will tell you how many pathPoints are in that subPath
    myPathInfo[index].entireSubPath[index].anchor will tell you the position of that pathPoint.
    The indexes start with zero.
    The bounding box of the entire subPath can be hard to work out just from the pathPoints. Unless all the point are corner points the path may extend beyond the anchors. One think you can do is create a new path from just one of the subPaths, convert by to a selection, and then get the bounds from the selection. You can make a new path from a subPath using the 'myPathInfo' array from above.
    app.activeDocument.pathItems.add("myPath1", [myPathInfo[0]]);
    That line will make a new path from the first subPath. Change the index to use a different subPath.
    Some other info that may help.
    app.activeDocument.histogram[0] will tell you how may black pixels are in the document. But its no help determining where they are. If that returns 0 there are no black pixels.
    If you don't have any luck working with converting the original color range selection into a path and need to go back to searching with the colorSampler it may help to use a grid approach. For example make a square selection, the size depending on how scattered the black pixels are, say 25x25px. Then use color range to select black. With an active selection it will only select pixels in that selected area( if any). You could then check to see if there is a selection. If not make another same size square to the right edge of the last area. If there is a selection, the solid property will tell you if more than one black pixel was selected( unless they are right next to each other ). If solid == true the selection bounds will tell you where the pixel is. If false you have to then search that square. But if there are areas where there are no black pixels checking a square range of pixels at once should be quite a bit faster than checking every pixel. And checking the historgram first will let you know if you should bother searching to start with.

  • Selecting Pixels based on a Blend Option

    I would like to select pixels based on a blend option— Multiply, Screen, etcetera— and I have yet to find out how to do this.  For example, I use the "Filter→Render→Clouds" effect, and I want to select pixels using the Screen effect so that white pixels will be at 100% opacity and black pixels will be at 0% opacity in the selection.  A plug-in would work as well.
    My apologies if this isn't the correct board for this type of thing.

    All right— I figured something out that works good enough.
    Here is a step-by step of what I did: [Note: Click on each image for a full-sized preview]
    First, make / open an image.  Make a backup copy if you opened an image.  I rendered a cloud effect.
    Select Image → Mode → Grayscale
    Open up the Channels window.
    Create a new channel, it will automatically make it an Alpha channel.
    Select the image and paste it into the Alpha 1 channel.
    Clear the "Gray" channel to 100% black [no transparentcy] and highlight Alpha 1 and click on the select button.
    Duplicate the main layer by dragging it to the new layer button and highlight the Gray channel and go to Select→ Save Selection
    Save it as a Mask and choose OK
    Next, to to Layer→ Layer Mask→ Apply
    And there you have it! White has 0% opacity, and black has 100%!
    If you wanted it to be reversed, as white has 100% opacity, and black has 0% opacity follow these steps:
    Right click on the icon of the layer, and choose Select Pixels
    Go to Select→ Inverse
    Make a new layer and hide the layer with the black.
    Fill that layer with white.
    Took me quite some time, but I figured it out.  I thought I would share it with anyone who needs to use it.

  • How do I "Select pixels" on more than one layer, then "Paint bucket" ?

    Hi
    Using Photoshop CS4.
    I have a document with several layers.
    If I right click a layer in the "Layers UI" and then click "Select pixels" then the pixels in that layer is selected.
    Then I can use the "Paint bucket" to e.g. set another color for the selected pixels.
    Is it possible to "Select pixels" from more than one layer, and then use "Paint bucket" once to change color for all the selected pixels in one go?

    You wont be able to FILL more than one layer at a time.
    But loading seections can be done by holding control SHIFT and clicking on the layer thumnail in the layers panel. Each click will load more area depending on which layers you load

  • When closing 2 windows(with multiple tabs each), system restore does not properly restore the second window's tabs. Is this a bug in the new update/any ideas to fix?

    I regularly use 2 windows with multiple tabs each and session restore would work to get them all back, but after this latest update the second window does not restore properly, with the first tab not visible on top(only in drop down menu) and the add a tab button now on the left(instead of right). The add a tab button is not really concerning other than it indicates other problems with the tabs on tab of the 2nd window. Not having the 1st tab visible is frustrating, because I can not move it or as easily navigate. Also, the tabs on top of the 2nd window that are visible no longer have the "x" to close visible unless that tab is selected. I'm assuming this is a problem with the new release/update, since this is the first time I've ever encountered the problem, and I've shut down and restored Firefox a few times to make sure this was a recurring problem and not a one-time deal. Any ideas on how to fix would be welcome(other than perhaps cramming my tabs onto one window or sucking it up XD).

    Hi,
    You can try to '''Reset toolbars and controls:''' and '''Make Changes and Restart''' in the [https://support.mozilla.org/en-US/kb/Safe%20Mode Safe Mode] start screen.
    If the problem persists, please try a [https://support.mozilla.org/en-US/kb/Managing-profiles?s=profile&r=0&e=sph&as=s new profile]. You can later copy [https://support.mozilla.org/en-US/kb/Backing%20up%20your%20information?s=backup&r=1&e=sph&as=s needed data] from the old profile to this.
    [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder & Files]

  • Windows boot manager boots almost fully into windows 8 before letting me select windows 7, at which point it reboots my computer

    Hi,
    I haven't used my slow HDD with windows 7 on it in a while, but today my SDD with windows 8 on it died. I have kept my old OS in a dual boot setup exactly for this rare possibility. I in fact successfully revived my SSD from windows 7.
    During the restore procedure I had to boot into both OSes (7 and 8) several times before I managed to get 8 working. I tried a lot of things before one of them struck. (Is that how the phrase goes?
    Me Hungary, no good speak English some times...) I am surprised to have found the following unexpected behavior of the new windows 8 branded boot loader:
    The new windows boot manager boots almost fully into windows 8 before letting me select an OS.
    If I select windows 7, it reboots my computer and loads windows 7, wasting a lot of time... on the windows 8 portion of the boot process, which is simply thrown away if I happen need windows 7 and not 8.
    "This is highly inefficient!" — I almost exclaimed aloud... A boot manager should load just enough of itself so that a simple OS selection menu can be presented to the user with minimal keyboard interaction. Only when a selection is made should
    it load an OS. I have no use for the new boot manager's mouse control support, and having it appear on the second screen in my dual screen setup is just plain scary. Use the main laptop monitor where the BIOS messages were displaying, and keep the secondary
    off until the OS is done booting! By the time my secondary screen turns on, the boot selection menu disappears anyway.
    Yes, I only noticed this problem now because I haven't booted into windows 7 for a long time. (300 MB worth of Windows updates were waiting for me indeed.) My boot selection menu timeout is set to 3 seconds instead of 30 so I don't have to pick windows 8
    every time.
    I am going to wait at least a week for the forum's input before I switch on my own to a faster, minimalist boot manager. I don't know what to use, I'm familiar with:
    some minimalist bootstrap loaders
    coreboot/linuxbios (recently learned of it)
    bootcamp (not really)
    acronis OS selector (discontinued before windows 8 came out, probably doesn't support it)
    syslinux/isolinux (Linux only, I think)
    old Windows bootmgr
    more recent Windows ntldr
    then this new "inefficient for dual booting" Windows 8 boot manager
    and finally grub
    Grub feels like the best option as it keeps the windows boot manager intact and supports mac, windows, and linux. All 3 of which will at one point — or has already — come up as a subject or prerequisite in my university.
    I don't know how or why I was able to access windows 8's boot loader while my SSD was dead. Was it installed on the HDD, overwriting the windows 7 boot loader? That too is inefficient. I want to completely boot from my SSD. Don't spin up my HDD while I'm
    booting my laptop on the go! The shaking of the vehicle I'm in could seriously damage the disk if I run into a pothole (common in my country) with just the right timing, data could be damaged. The entire reason windows 8 is on an SSD is so that it can boot
    without accessing my HDD with all its moving parts. My goal with buying an SSD was for the HDD to remain safely offline while I'm in a shaky environment with potholes! Also, what if I want to disconnect the old HDD in the future... Or what if it dies? Will
    the windows 8 boot loader die with windows 7? I want the two kept separately and completely independent from each other for exactly this reason.
    In summary:
    How can I stop windows 8 from almost fully booting before offering the dual boot OS selection menu? Do I need a better Boot loader?
    Why was the boot loader that came with windows 8 still working OK while the SSD with windows 8 on it wasn't accessible? Did it sneak its way onto the old HDD? I want a 100% SSD-based boot process. What is the boot loader doing on a different drive? Its
    place is on the SSD, with the operating system it belongs to. Not on the HDD of a different OS. Can I move it?
    Sincerely,
    Daniel "3ICE" Berezvai
    p.s.: For windows 7 I only have a repair disk and hidden RECOVERY partition which I kept (came with the laptop, would rather not use it.) The Windows 8 pro DVD (purchased last year) is fine, but I had it moved to a bootable pendrive so I could remove my
    optical drive and replace it with an SSD on which windows 8 is installed now. (I also have a vista ultimate DVD, as they were giving them away for free on a Microsoft conference. Funny story.)
    p.p.s.: I am subscribed (☑ Alert me) to this topic and will respond to all questions and try all recommended actions right away.
    http://3ice.hu/

    Hi,
    Thank you for your post.
    From your description, I see the issue you are facing is there is no menu to choose OS when booting dual boot(Windows 7 & Windows 8). Please let me know if I have misunderstood anything.
    It seems that the Windows 7 entry is missing, currently, we can use a tool –
    EasyBCD to get it back. After downloading it, choose the Add/Edit panel item, select the OS you're missing and let the program detect it. Then simply click the Add button to add the missing OS entry.
    At the meantime, here is a related link which demonstrates how to keep Windows 7 as the default OS in dual boot, you may use it for a reference.
    How to Dual-Boot Windows 8 While Keeping Windows 7 As Your Default OS
    http://blog.laptopmag.com/how-to-dual-boot-windows-8-while-keeping-windows-7-as-your-default-os
    [Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy
    of this information.]
    Regarding your second questions in your first post, you can refer to the following link to know more about dual boot.
    Dual
    Booting Explained: How You Can Have Multiple Operating Systems on Your Computer
    http://www.howtogeek.com/187789/dual-booting-explained-how-you-can-have-multiple-operating-systems-on-your-computer/
    [Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy
    of this information.]
    Hopefully the information is helpful. Please let me know if you have any questions. Thanks for your time.
    Best Regards,
    Sophia Sun
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • How can you set Thunderbird to accept multiple attachments, particularly when selecting "email" in Windows Gallery with T'bird selected as default email

    Using Windows Gallery to send email photos - wioth each selection T'Bird opens a new email form. How can I set T'Bird to accept multiple attachments (similar to Gmail ).
    Using W'Gallery has the benefit of rteducing size of emailed pic to a few hundre kb.
    Thanks

    You best ask the windows gallery people. Thunderbird opening more than one window is based on yhow the request is made, not on Thunderbird,
    Selecting multiple files in explorer simply adds them to a mail, therefore the Windows gallery is the problem.

  • Selecting pixels on the outer edge of an item?

    When making a selection with either a lasso or Magic Wand, it seems to select the item, however, when I zoom in, there seems to be lots of soft pixels on the edges of the items that are not being included in my selection.
    What is the best way to get these outer pixels that have different colors and levels of transparency?
    Thanks!

    Those pixels may be only partly selected. A selection is just a mask, which is used to limit your edits to only he masked (or selected) area. If you, for example, fill a selection with white, you are just replacing the masked pixels with white. Some pixels can be partly selected, which would result in the white fill not being completely opaque. A 50% selected pixel would end up with a 50% white fill, effectively making it 50% less bright. For example, a red pixel (255,0,0) would become pink (128,0,0).
    Photoshop’s marching ants, as they have been called for decades, can only show whether an area either is or is not selected, it can’t show the level of selection. You can view the selection as a mask by pressing Q, invoking QuickMask. Now if you zoom into the edge of your selection you will see that those pixels near the edge are partly selected.
    If you don’t want partially selected pixels, then you can turn off Anti-alias in the tool options panel at the top of the screen.

  • Is it possible to save a Photoshop project with multiple tabs (inducing images) for later use. Now, when I close Photoshop, it ask to save each tab separately and they are not staying in the project for later usage. Thanks in advance for you help.

    Is it possible to save a Photoshop project with multiple tabs (inducing images) for later use. Now, when I close Photoshop, it ask to save each tab separately and they are not staying in the project for later usage. Thanks in advance for you help.

    You should ask in Photoshop General Discussion
    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • Moving, copying, and deleting selected pixels

    This question was posted in response to the following article: http://help.adobe.com/en_US/photoshop/cs/using/WSfd1234e1c4b69f30ea53e41001031ab64-76dba.h tml

    How can I completely remove selected pixels, so that there is NOT the background colour after pressing delete? I want the picture to become smaller by cutting away unneeded pixels... I already worked a bit with a regular Photoshop version a few years ago and I think there was a cutting tool which cut away the pixels without replacing them... but with Photoshop 5.0 it seems I can only select pixels and press "clear", but then the pixels are not gone, but replaced, which I do not want... how can I make them dissappear when working on a background layer? Yes, this is very basic, but sorry, I cannot find it out...

  • I would like to use time Machine to back up to a network SMB drive. I can see the drive on my desktop but it will not show in the time machine window to be able to select it

    I currently have a mini server (OSX10.8.5, server 2.2.2) that I am using Time Machine to back up 4 external drives that are connected to the server via firewire 800. I would like to use Time Machine to back up to a windows network SMB drive. I can see the drive on my desktop but it will not show in the time machine window to be able to select it for use.
    Can this be done
    Thanks for any and all help

    The supported targets for Time Machine backups are local (direct-connected) disks, and network targets include Time Capsule, a disk hanging off the current-generation AirPort (though not earlier AirPort devices), and OS X Server systems.
    The Time Machine storage is based on the HFS+ file system, so I would not expect TM to work with SMB file services.
    While there are hacks to allow Time Machine to access network drives, I would not consider those to be reliable. Skim the forum and the 'net for related details, and for previous discussions of setting this up and the related issues that can arise.
    Remember to test the recovery with whatever you decide to use; whole point of backups is the ability to restore the data, after all.
    If you want to learn more about Time Machine, Pondini is an excellent resource.

  • Open several PDFs in the same Reader window using tabs for each document

    How do I open several PDFs in the same Reader window using tabs for each document?  I'm using Reader 11.0.03 and Windows 7.  

    That would be a nice feature!  Suggest it at https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform - hopefully it will make it into Reader XII.

  • Have installed and uninstalled Adobe Acrobat XI Pro on my Dell desktop running Windows 7 Professional. Each time I try to open a PDF file, I receive ERROR: 16 message. Would appreciate any suggestions. Thanks.

    Have installed and uninstalled Adobe Acrobat XI Pro on my Dell desktop running Windows 7 Professional. Each time I try to open a PDF file, I receive ERROR: 16 message. Would appreciate any suggestions. Thanks.

    Hi Doug Talbott,
    Please refer to the page associated with this link (Configuration error 16 | CC, CS) and follow the procedure detailed for Windows 7 and let me know if your issue gets resolved.
    Regards,
    Rahul Tyagi

Maybe you are looking for

  • How to know open item or closed item

    Hi Folks I have developed a report on FI . iam displaying open items( BSIK) and closed item (BSAK) in one file. my question is there any filed available in BSIK or BSAK to user know whether that transaction is open or closed? becasue iam displaying a

  • Why won't itunes work with windows 8.1?  i tunes can not locate my music.

    Why won't windows 8.1 let itunes locate my music?  I deleted and downloaded, still won't do it.  But like majic after I installed windows 8.1 my computer had a XBOX music player appear, that found my 3200 songs and it was able to play the entire libr

  • Common power adapter for Macbook Air and Macbook Pro?

    I have both a Macbook Air and a Macbook Pro at home, and it would be really nice to have one magsafe adapter by the couch rather than two... I have actually tried the Air 45w adapter on my Pro and it works fine as long as the Pro is not fully dischar

  • GG extract - what is excessive 'control file sequential reads'?

    Hi, base SR - 3-2192225691, GG - 10.4.0.19, database - 11.2.0.1.0, running on Linux x86 64-bit customer opened SR based on high number of control file sequential read Top 5 Timed Foreground Events (over 13+ hrs) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Avg wait

  • Runtime is not working

    Hi all, I am trying to run SQLLDR command using java. i am using Runtime class to run the command. but the command is not executing. After executing the system get hanged. please suggest me to solve this. My code is, Runtime rt = Runtime.getRuntime()