How to transform a binary image into jpg or png in script

Community Beginner ,
Apr 15, 2021 Apr 15, 2021

Copy link to clipboard

Copied

There is a way to transform a binary image into jpg or png via script?

 

I tried to do this by inserting the binary image but it returns an error look;

 


// =======================================================
var idPlc = charIDToTypeID( "Plc " );
var desc873 = new ActionDescriptor();
var idIdnt = charIDToTypeID( "Idnt" );
desc873.putInteger( idIdnt, 110 );
var idnull = charIDToTypeID( "null" );

var image1_imgString = // here would be the binary image

desc873.putPath( idnull, new File( image1_imgString ) );

var idFTcs = charIDToTypeID( "FTcs" );
var idQCSt = charIDToTypeID( "QCSt" );
var idQcsa = charIDToTypeID( "Qcsa" );
desc873.putEnumerated( idFTcs, idQCSt, idQcsa );
var idOfst = charIDToTypeID( "Ofst" );
var desc874 = new ActionDescriptor();
var idHrzn = charIDToTypeID( "Hrzn" );
var idPxl = charIDToTypeID( "#Pxl" );
desc874.putUnitDouble( idHrzn, idPxl, 0.000000 );
var idVrtc = charIDToTypeID( "Vrtc" );
var idPxl = charIDToTypeID( "#Pxl" );
desc874.putUnitDouble( idVrtc, idPxl, 0.000000 );
var idOfst = charIDToTypeID( "Ofst" );
desc873.putObject( idOfst, idOfst, desc874 );
executeAction( idPlc, desc873, DialogModes.NO );

 




TOPICS
Actions and scripting, How to

Views

28

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 15, 2021 Apr 15, 2021

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 15, 2021 Apr 15, 2021

Copy link to clipboard

Copied

did not open

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 15, 2021 Apr 15, 2021

Copy link to clipboard

Copied

LATEST

Of course, you need some pattern that maybe someone will provide over here 😉

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines