Reputation: 1632
I could not load a tif image with Vaadin 7 rc1
Here are the some of the alternatoves I have tried:
String basepath = VaadinService.getCurrent().getBaseDirectory().getAbsolutePath();
Image image = new Image("Image", new FileResource(new File(basePath + "myPath/image.tif")));
Embedded image = new Embedded("Image", new ThemeResource("/pathToResource/imgae.jtif"));
In both cases the image was where the path pointed. Moreover if I had a jpg
or png
image in the same directory it was shown without a problem.
Does Vaadin 7 rc1 not support tif
images?
Upvotes: 2
Views: 774
Reputation: 4967
The real question here is that if your browser supports TIFF images. Take a look at this wikipedia article.
For cross-browser compatibility, I suggest you to convert your images to PNG or JPG.
Upvotes: 3