Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe Photoshop Getting pixel data in Photoshop scripts with JavaScript?

  • Getting pixel data in Photoshop scripts with JavaScript?

    Posted by Vince Petaccio on July 10, 2016 at 4:38 pm

    Hi! I’m in the process of trying to write a Photoshop script to perform pixel sorting.

    While there are many ways of achieving the effect, a common (and simple) method is to perform a threshold on the image, then grab all of the pixels above the brightness threshold and sort them along some dimension (x vs y or some other vector) by brightness.

    Obviously in order to do this I need to have access to all the pixels in the image as RGBA values, as a data matrix or some other structure.

    Is there any way to access all of the pixel information in an image via JavaScript? I feel like there must be a simple way to do it but I can’t seem to find good information on this.

    Thanks! :]
    -Vince

    Kalleheikki Kannisto replied 10 years, 2 months ago 2 Members · 1 Reply
  • 1 Reply
  • Kalleheikki Kannisto

    July 11, 2016 at 6:23 am

    Not that familiar with Photoshop Javascript capabilities, but you could look into Filter Forge which has LUA scripting that can access image data on pixel level. It may not be ideal for this type of processing either, for the program is essentially procedural node-based image processing and it is not optimized for script usage, but I’ve done some interesting things with it, and it is certainly possible, if slightly cumbersome, to do things like this with.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy