String imageUrl = imageUrl(imageInfo, filename);
AWEncodedString width = widthString(bindingsHashtable, imageInfo);
AWEncodedString height = heightString(bindingsHashtable, imageInfo);
String widthString = width.string();
String heightString = height.string();
AWFastStringBuffer fastStringBuffer = new AWFastStringBuffer();
fastStringBuffer.append("<img src=\"");
fastStringBuffer.append(imageUrl);
fastStringBuffer.append("\"");
if (widthString != null) {
fastStringBuffer.append(" width=\"");
fastStringBuffer.append(widthString);
fastStringBuffer.append("\"");
}
if (heightString != null) {
fastStringBuffer.append(" height=\"");
fastStringBuffer.append(heightString);
fastStringBuffer.append("\"");
}
AWBinding borderBinding = (AWBinding)bindingsHashtable.remove(BindingNames.border);
String borderString = (borderBinding != null) ? borderBinding.stringValue(null) : "0";
if (borderString != null) {
fastStringBuffer.append(" border=\"");
fastStringBuffer.append(borderString);
fastStringBuffer.append("\"");
}
// no alt binding, so specifying empty string for now
fastStringBuffer.append(" alt=\"\"");
AWBindingDictionary bindingsDictionary = AWBinding.bindingsDictionary(bindingsHashtable);
appendHtmlAttributes(fastStringBuffer, bindingsDictionary);
fastStringBuffer.append(">");
return fastStringBuffer.toString();
}