how get CMYK value of each pixel coordinate position at every layer
file cmyk.... have many layers,i want compare cmyk value (such layer 1 cmyk value , layer 2 cmyk value)
i want cmyk value of each pixel coordinate position @ every layer,how get use sdk?
c value=?
m value=?
y value=?
k value=?
消息编辑者为:kong kong
i use getter...get getter.log....i find
sperr playgetting channel 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 top of routine!
piactiondescriptor desc0000000000000890 = null;
error = spsactiondescriptor->make(&desc0000000000000890);
if (error) goto returnerror;
// unicode string utf8: cyan
error = spsactiondescriptor->putstring(desc0000000000000890, keychannelname, "cyan");//cyan
if (error) goto returnerror;
error = spsactiondescriptor->putinteger(desc0000000000000890, keyitemindex, 1);
if (error) goto returnerror;
error = spsactiondescriptor->putinteger(desc0000000000000890, keycount, 9);//here...is alpachannel number include c,m,y,k
if (error) goto returnerror;
error = spsactiondescriptor->putboolean(desc0000000000000890, keyvisible, true);
if (error) goto returnerror;
// move top of routine!
piactionlist list0000000000000110 = null;
error = spsactionlist->make(&list0000000000000110);
if (error) goto returnerror;
error = spsactionlist->putinteger(list0000000000000110, 306);//----------0-----------100% here c100 numbers
if (error) goto returnerror;
error = spsactionlist->putinteger(list0000000000000110, 321);//----------1------------99% here c99 numbers
if (error) goto returnerror;
error = spsactionlist->putinteger(list0000000000000110, 21);//----------2------------98% here c98 numbers
if (error) goto returnerror;
............
............
error = spsactionlist->putinteger(list0000000000000110, 110979);//-------244----------1% here c1 numbers
if (error) goto returnerror;
error = spsactionlist->putinteger(list0000000000000110, 87262389);//-----255----------0% here c0 numbers
if (error) goto returnerror;
//*****************************************************************************
//error = spsactionlist->putinteger(list0000000000000110, 306);
//if (error) goto returnerror;
//to repeat 256 times
error = spsactiondescriptor->putlist(desc0000000000000890, 'hstg', list0000000000000110);
if (error) goto returnerror;
error = spsactioncontrol->stringidtotypeid("getting channel info", &runtimeeventid);
if (error) goto returnerror;
error = spsactioncontrol->play(&result, runtimeeventid, desc0000000000000890, plugindialogsilent);
if (error) goto returnerror;
returnerror:
if (result != null) spsactiondescriptor->free(result);
if (desc0000000000000890 != null) spsactiondescriptor->free(desc0000000000000890);
if (list0000000000000110 != null) spsactionlist->free(list0000000000000110);
return error;
}
i set image 1x1 pixel,
sperr playgetting channel 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 top of routine!
piactiondescriptor desc0000000000000890 = null;
error = spsactiondescriptor->make(&desc0000000000000890);
if (error) goto returnerror;
// unicode string utf8: cyan
error = spsactiondescriptor->putstring(desc0000000000000890, keychannelname, "cyan");//cyan
if (error) goto returnerror;
error = spsactiondescriptor->putinteger(desc0000000000000890, keyitemindex, 1);
if (error) goto returnerror;
error = spsactiondescriptor->putinteger(desc0000000000000890, keycount, 9);//here...is alpachannel number include c,m,y,k
if (error) goto returnerror;
error = spsactiondescriptor->putboolean(desc0000000000000890, keyvisible, true);
if (error) goto returnerror;
// move top of routine!
piactionlist list0000000000000110 = null;
error = spsactionlist->make(&list0000000000000110);
if (error) goto returnerror;
error = spsactionlist->putinteger(list0000000000000110, 0);//-----0-----------100% here c100 numbers
if (error) goto returnerror;
error = spsactionlist->putinteger(list0000000000000110, 0);//----1------------99% here c99 numbers
if (error) goto returnerror;
error = spsactionlist->putinteger(list0000000000000110, 0);//------2------------98% here c98 numbers
if (error) goto returnerror;
............
............
error = spsactionlist->putinteger(list0000000000000110, 1);//-----120--------53% here c56 numbers .to repeat 121 times, value 1
if (error) goto returnerror;
//to repeat 256 times, value 1. other zero,
............
............
error = spsactionlist->putinteger(list0000000000000110, 0);//------254---------1% here c1 numbers
if (error) goto returnerror;
error = spsactionlist->putinteger(list0000000000000110, 0);//-------255-------0% here c0 numbers
if (error) goto returnerror;
error = spsactiondescriptor->putlist(desc0000000000000890, 'hstg', list0000000000000110);
if (error) goto returnerror;
error = spsactioncontrol->stringidtotypeid("getting channel info", &runtimeeventid);
if (error) goto returnerror;
error = spsactioncontrol->play(&result, runtimeeventid, desc0000000000000890, plugindialogsilent);
if (error) goto returnerror;
returnerror:
if (result != null) spsactiondescriptor->free(result);
if (desc0000000000000890 != null) spsactiondescriptor->free(desc0000000000000890);
if (list0000000000000110 != null) spsactionlist->free(list0000000000000110);
return error;
}
More discussions in Photoshop Plugin and Companion App SDK
adobe
Comments
Post a Comment