return img.getImageBytes("png");
}
}
protected ASObject toAMFObject(Component cfc) throws PageException {
ASObject aso = new ASObject();
aso.setType(cfc.getCallName());
Component c=cfc;
if(cfc instanceof ComponentAccess)c=ComponentWrap.toComponentWrap(methodAccessLevel,cfc);
Property[] prop = cfc.getProperties(false);
Object v; UDF udf;
if(prop!=null)for(int i=0;i<prop.length;i++) {
boolean remotingFetch = Caster.toBooleanValue(prop[i].getDynamicAttributes().get(REMOTING_FETCH,Boolean.TRUE),true);
if(!remotingFetch) continue;
v=cfc.get(prop[i].getName(),null);
if(v==null){
v=c.get("get"+prop[i].getName(),null);
if(v instanceof UDF){
udf=(UDF) v;
if(udf.getReturnType()==CFTypes.TYPE_VOID) continue;
if(udf.getFunctionArguments().length>0) continue;
try {
v=c.call(ThreadLocalPageContext.get(), udf.getFunctionName(), ArrayUtil.OBJECT_EMPTY);
} catch (PageException e) {
continue;
}
}
}
aso.put(toString(prop[i].getName(),forceCFCLower), toAMFObject(v));
}
return aso;
}