Hi everyone, currently, file formats support is quite limited in YaCy Images search results preview.
As far as I know, on current github version only major formats are correctly displayed : png, jpeg, bmp, ico plus gif and svg unscaled (if anyone is interested I started a test file to check it : https://github.com/luccioman/yacy_search_server/tree/master/test/viewImageTest
Don't you think it would be interesting to have some more image formats rendered in thumb preview, such as JPeg2000 or Tiff as they are not so uncommon?
As Java SE JDK doesn't support theses formats, additional libraries such as https://github.com/haraldk/TwelveMonkeys
could be used.
A small refactoring would be necessary on ViewImage.java : javax.imageio.ImageIO.read(URL) would be used instead of java.awt.Toolkit .createImage(URL). This way using JDK SPI system of ImageIO, future new image formats could be easily added with no more refactoring needed on ViewImage.
Do you think it is a good idea? I am ready to implement and test this but if anyone is already on this subject I let this to you.
Another point of view could be to stop rendering image previews with YaCy ViewImage class and rely solely on browser rendering with its eventual plugins... Maybe a configuration option could let user switch between the 2 rendering systems? Maybe someone have other suggestions?