Skip to main content
rechmbrs
Inspiring
September 4, 2016
Question

48 bit rgb or 96 bit rgb pixel manipulation javascript

  • September 4, 2016
  • 2 replies
  • 1042 views

I have only found examples for manipulating 24 bit rgb or 32 bit rgba pixels within javascript but need to handle whatever is passed to the script.  Can canvas handle 48bit or 96 bit pixels?  If so, please refer me to examples.

Thanks,

RONC

This topic has been closed for replies.

2 replies

c.pfaffenbichler
Community Expert
Community Expert
September 4, 2016

I seldom work with 32bit images, but I have found no problems in Photoshop Scripts handling 16bit images.

Part of my reason for asking about 32bit/color is because of the missing functionality.

If functionality you want to use in a Script is unavailable for some bit depth/s you can either include a check (for bit depth) and proceed accordingly or wrap the affected sections of code in try-clauses.

Chuck Uebele
Community Expert
Community Expert
September 4, 2016

As far as I know, Photoshop only handles up to 32 bit images. Where are you getting 48 or 96 bit images?

rechmbrs
rechmbrsAuthor
Inspiring
September 4, 2016

3x16 or 3x32 bits per rgb pixel.   My camera creates 16 bits per color.   Something like HDR uses 3x32 bits per pixel - 32 bits per color.

Examples show only 24 or 32 bits per pixel and 8 bits per color for rgb or rgba.

RONC

Jarda Bereza
Inspiring
September 4, 2016

Photoshop support 32bit per channel.

2016-09-04_120922.jpg

2016-09-04_120742.jpg

This is example how colorPicerker set up foreground color:

var idsetd = charIDToTypeID( "setd" );

    var desc22 = new ActionDescriptor();

    var idnull = charIDToTypeID( "null" );

        var ref3 = new ActionReference();

        var idClr = charIDToTypeID( "Clr " );

        var idFrgC = charIDToTypeID( "FrgC" );

        ref3.putProperty( idClr, idFrgC );

    desc22.putReference( idnull, ref3 );

    var idT = charIDToTypeID( "T   " );

        var desc23 = new ActionDescriptor();

        var idRd = charIDToTypeID( "Rd  " );

        desc23.putDouble( idRd, 143.985385 );

        var idGrn = charIDToTypeID( "Grn " );

        desc23.putDouble( idGrn, 57.030228 );

        var idBl = charIDToTypeID( "Bl  " );

        desc23.putDouble( idBl, 57.030228 );

    var idRGBC = charIDToTypeID( "RGBC" );

    desc22.putObject( idT, idRGBC, desc23 );

    var idSrce = charIDToTypeID( "Srce" );

    desc22.putString( idSrce, """photoshopPicker""" );

executeAction( idsetd, desc22, DialogModes.NO );

Anyway your posibilities in 32bit/channel are reduced. Not everything in Photoshop is designed to work in this mode.

2016-09-04_121251.jpg