(imageFile, altText)
| 1260 | } |
| 1261 | |
| 1262 | function readImage(imageFile, altText) { |
| 1263 | var contentType = contentTypes.findContentType(imageFile.path); |
| 1264 | |
| 1265 | var image = documents.Image({ |
| 1266 | readImage: imageFile.read, |
| 1267 | altText: altText, |
| 1268 | contentType: contentType |
| 1269 | }); |
| 1270 | var warnings = supportedImageTypes[contentType] ? |
| 1271 | [] : warning("Image of type " + contentType + " is unlikely to display in web browsers"); |
| 1272 | return elementResultWithMessages(image, warnings); |
| 1273 | } |
| 1274 | |
| 1275 | function undefinedStyleWarning(type, styleId) { |
| 1276 | return warning( |
no test coverage detected