Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
As far as I know, Photoshop only handles up to 32 bit images. Where are you getting 48 or 96 bit images?
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Photoshop support 32bit per channel.
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.
Copy link to clipboard
Copied
Thanks so much for the response.
Part of my reason for asking about 32bit/color is because of the missing functionality.
So I should be able to manipulate individual pixels the same way as you showed. Correct? But I'm sure it will not be very efficient.
Can I use getImageData and putImageData functions?
RONC
Copy link to clipboard
Copied
Can I use getImageData and putImageData functions?
I have no idea. This questionis is for someone else. Or you could just try it.
Otherwise you can use almost everything what is not disabled when PS is in 32/channel mode.
Copy link to clipboard
Copied
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.