String encoding = (String)properties.get(ENCODING_TYPE_KEY);
if (encoding != null)
return encoding;
// Pick an encoding based on the Configuration/Agent
Configuration config = context.getConfiguration();
TrinidadAgent agent = context.getAgent();
//encodings was part of old Agent capabilities, not in new Agent Caps. So replaced
//Object encodingsObj = agent.getCapability(AdfFacesAgent.CAP_IMAGE_ENCODINGS);
//int encodings = ((encodingsObj == null)
// ? (AdfFacesAgent.IMAGE_ENCODINGS_CAP_GIF |
// AdfFacesAgent.IMAGE_ENCODINGS_CAP_PNG)
// : ((Number) encodingsObj).intValue());
// If GIF is enabled and supported, use it
//if (((encodings & AdfFacesAgent.IMAGE_ENCODINGS_CAP_GIF) != 0) &&
// !Boolean.FALSE.equals(config.getProperty(_GIF_ENABLED)))
//{
// return ImageEncoderManager.GIF_TYPE;
//}
if ((agent.getCapability(TrinidadAgent.CAP_GIF_TYPE_IMAGE) == Boolean.TRUE) &&
!Boolean.FALSE.equals(config.getProperty(_GIF_ENABLED)))
{
return ImageEncoderManager.GIF_TYPE;
}
//encodings was part of old Agent capabilities, not in new Agent Caps. So replaced