Question
Please provide the code to change image color mode in automation plugin
Hi
I want to change the color mode of the document to rgb
this is the code that i have got from history how do i make use of it to create a function that convert color mode to rgb.
SPErr PlayGetting History Info(/*your parameters go here*/void)
{
PIActionDescriptor result = NULL;
DescriptorTypeID runtimeKeyID;
DescriptorTypeID runtimeTypeID;
DescriptorTypeID runtimeObjID;
DescriptorTypeID runtimeEnumID;
DescriptorTypeID runtimeClassID;
DescriptorTypeID runtimePropID;
DescriptorTypeID runtimeUnitID;
SPErr error = kSPNoError;
// Move this to the top of the routine!
PIActionDescriptor desc0000000000000a50 = NULL;
error = sPSActionDescriptor->Make(&desc0000000000000a50);
if (error) goto returnError;
// Unicode String as UTF8: RGB Color
error = sPSActionDescriptor->PutString(desc0000000000000a50, keyName, "RGB Color");
if (error) goto returnError;
error = sPSActionDescriptor->PutInteger(desc0000000000000a50, keyItemIndex, 3);
if (error) goto returnError;
error = sPSActionDescriptor->PutInteger(desc0000000000000a50, keyCount, 3);
if (error) goto returnError;
error = sPSActionDescriptor->PutBoolean(desc0000000000000a50, keyAuto, true);
if (error) goto returnError;
error = sPSActionDescriptor->PutBoolean(desc0000000000000a50, keyHistoryBrushSource, false);
if (error) goto returnError;
error = sPSActionDescriptor->PutBoolean(desc0000000000000a50, keyCurrentHistoryState, true);
if (error) goto returnError;
error = sPSActionDescriptor->PutInteger(desc0000000000000a50, keyID, 80);
if (error) goto returnError;
error = sPSActionControl->StringIDToTypeID("Getting History Info", &runtimeEventID);
if (error) goto returnError;
error = sPSActionControl->Play(&result, runtimeEventID, desc0xa50, plugInDialogSilent);
if (error) goto returnError;
returnError:
if (result != NULL) sPSActionDescriptor->Free(result);
if (desc0000000000000a50 != NULL) sPSActionDescriptor->Free(desc0000000000000a50);
return error;
}
I would really appreciate any thoughts/suggestions on the matter.
Thanks all.
