final ImageReader ir = imageReaders.next();
ir.setInput(img);
final IIOMetadata imageMetadata = ir.getImageMetadata(0);
final Node n = imageMetadata.getAsTree("javax_imageio_1.0");
float _parseFloat = Float.parseFloat("2.835");
XFloat ppmm = new XFloat(Float.valueOf(_parseFloat));
Node cn = n.getFirstChild();
while ((!Objects.equal(cn, null))) {
{
String _nodeName = cn.getNodeName();
boolean _equals = Objects.equal(_nodeName, "Dimension");
if (_equals) {
Node ccn = cn.getFirstChild();
while ((!Objects.equal(ccn, null))) {
{
String _nodeName_1 = ccn.getNodeName();
boolean _equals_1 = _nodeName_1.equals("HorizontalPixelSize");
if (_equals_1) {
NamedNodeMap _attributes = ccn.getAttributes();
Node _item = _attributes.item(0);
String _nodeValue = _item.getNodeValue();
float _parseFloat_1 = Float.parseFloat(_nodeValue);
XFloat _xFloat = new XFloat(Float.valueOf(_parseFloat_1));
XFloat _divide = XFloatExtensions.operator_divide(Integer.valueOf(1), _xFloat);
ppmm = _divide;
}
Node _nextSibling = ccn.getNextSibling();
ccn = _nextSibling;
}
}
}
Node _nextSibling = cn.getNextSibling();
cn = _nextSibling;
}
}
String _xifexpression = null;
int _width = ir.getWidth(0);
XFloat _divide = XFloatExtensions.operator_divide(Integer.valueOf(_width), ppmm);
Boolean _greaterThan = XFloatExtensions.operator_greaterThan(_divide, Integer.valueOf(140));
if ((_greaterThan).booleanValue()) {
_xifexpression = "width=\\textwidth";
} else {
_xifexpression = "";