diff --git a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ImageUrlUtils.java b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ImageUrlUtils.java index 54231124c1dcf74a0ebd10f41df27dd0ac25467b..3624e6a9ef6a7909ef7dcd638551e9929a17f66d 100644 --- a/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ImageUrlUtils.java +++ b/screening/source/java/ch/systemsx/cisd/openbis/plugin/screening/client/web/client/application/detailviewers/ImageUrlUtils.java @@ -74,7 +74,8 @@ public class ImageUrlUtils methodWithParameters.addParameter("mode", "thumbnail" + width + "x" + height); String imageURL = methodWithParameters.toString(); - return URLMethodWithParameters.createEmbededImageHtml(imageURL, linkURL, width, height); + // do not specify width to get correct aspect ratio of the original image + return URLMethodWithParameters.createEmbededImageHtml(imageURL, linkURL, -1, height); } /** creates a widget which displays the specified URL and adds it to the container */ @@ -106,7 +107,8 @@ public class ImageUrlUtils methodWithParameters.addParameter("mode", "thumbnail" + width + "x" + height); String imageURL = methodWithParameters.toString(); - return URLMethodWithParameters.createEmbededImageHtml(imageURL, linkURL, width, height); + // do not specify width to get correct aspect ratio of the original image + return URLMethodWithParameters.createEmbededImageHtml(imageURL, linkURL, -1, height); } private static URLMethodWithParameters createBasicImageURL(String sessionID, WellImages images,