Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,12 @@ private Canvas[] createCanvases(final CsvHeaders aCsvHeaders, final List<String[
imageResource = new ImageResource(resourceURI);
imageResource.setWidth(mediaWidth);
imageResource.setHeight(mediaHeight);
imageResource.setService(new ImageInfoService(APIComplianceLevel.TWO, pageURI));
staticImage = true;

if (!accessURI.matches("^.+\\.[^.]+$")) { // Does the URI have a file extension?
imageResource.setService(new ImageInfoService(APIComplianceLevel.TWO, pageURI));
} else {
staticImage = true;
}
} else {
// If we don't have both width and height in the CSV, we can also try to look it up
final ImageInfoLookup infoLookup = new ImageInfoLookup(pageURI);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,16 +577,20 @@ private Canvas[] createCanvases(final CsvHeaders aCsvHeaders, final List<String[
if (mediaWidth.isPresent() && mediaHeight.isPresent()) {
width = Integer.parseInt(mediaWidth.get());
height = Integer.parseInt(mediaHeight.get());
image = new ImageContent(accessURI);
image = new ImageContent(resourceURI);

if (!accessURI.matches("^.+\\.[^.]+$")) { // Does the URI have a file extension?
image.setServices(new ImageService2(pageURI));
}
} else {
final ImageInfoLookup infoLookup = new ImageInfoLookup(pageURI); // Look up w/h for page URI

width = infoLookup.getWidth();
height = infoLookup.getHeight();
image = new ImageContent(resourceURI);
image = new ImageContent(resourceURI).setServices(new ImageService2(pageURI));
}

image.setWidthHeight(width, height).setServices(new ImageService2(pageURI));
image.setWidthHeight(width, height);
canvas.setWidthHeight(width, height).setThumbnails(new ImageContent(thumbnail));
canvas.paintWith(image);
} catch (final IOException details) {
Expand Down
Loading