Hi,
Vaadin version: 14.3.5
Browser to be supported: Chrome, IE and Mozilla Firefox
I want to render base64 encoded Tiff image string into vaadin grid component.
I have tried template render with HTML and it is working fine to render JPEG & PNG base64 string but not working for Tiff.
Because rendering Tiff image not supported by majority of the browser as mentioned in the below links.
https://stackoverflow.com/questions/51870394/displaying-the-base64-tiff-images-in-html
https://en.wikipedia.org/wiki/Comparison_of_web_browsers#Image_format_support
this.grid.addColumn(TemplateRenderer.<SearchResult>of(
"<div><img style='height: 80px; width: 80px;' src='[[item.label]
]'/></div>"
)
I have found the TiffViewer add on in the vaadin directory but it is not supported in Vaadin 14.
https://vaadin.com/directory/component/tiffviewer
Due to the dependency library version (JSoup), I am getting the below error.
java.lang.NoSuchMethodError: org.jsoup.nodes.DocumentType.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
at com.vaadin.flow.server.BootstrapHandler$BootstrapPageBuilder.getBootstrapPage(BootstrapHandler.java:531) ~[flow-server-2.3.4.jar:2.3.4]
at com.vaadin.flow.server.communication.WebComponentBootstrapHandler.synchronizedHandleRequest(WebComponentBootstrapHandler.java:213) ~[flow-server-2.3.4.jar:2.3.4]
at com.vaadin.flow.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) ~[flow-server-2.3.4.jar:2.3.4]
at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1545) ~[flow-server-2.3.4.jar:2.3.4]
at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:247) ~[flow-server-2.3.4.jar:2.3.4]
at com.vaadin.flow.spring.SpringServlet.service(SpringServlet.java:108) ~[vaadin-spring-12.3.1.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.35.jar:9.0.35]
There is a suggested options that convert Tiff to JPEG/PNG and render with HTML tag but my requirement is not to covert into another image format.
Trying to achieve the functionality using external Javascript library such as,
https://github.com/seikichi/tiff.js refering the implementation in https://github.com/Artur-/threejs-vaadin/tree/master/frontend but no luck getting “undefined” for Tiff.
Is there a way to render base64 encoded string Tiff images into Vaadin Grid?
Thanks,
Uvaraj Seerangan