DDMAL / VIM

The Virtual Instrument Museum website repository
MIT License
0 stars 2 forks source link

Convert current TIFF images to PNG #104

Open zhannaklimanova opened 1 month ago

zhannaklimanova commented 1 month ago

Update (@dchiller; 10 June)

Based on discussion in #53, non-supported image types will eventually be converted to PNG on upload. For existing images, we can run a converter on them when we have a converter and an image storage solution.


A browser-related issue where .tif images are not displayed in Chrome. Two possible solutions could be implemented for this:

  1. Python functionality to convert .tif images to .png, .jpg, or another format that is more generally supported by all browsers. This would be added as a step before populating/updating the database tables with data. A pro for this solution would be that if a corresponding .png or .jpg image doesn't exist, the .tif can be easily converted.
  2. Go into the database and run UPDATE SQL commands to replace the .tif with .png or .jpg images in the actual database. A con for this solution is that a replacement .png or .jpg will be hard to find and also the manual work associated with cut and replacing the image link.

Safari: image

Chrome: image

zhannaklimanova commented 1 month ago

@dchiller any advice?

dchiller commented 1 month ago

A quick note that #53 is a related issue (what to do about TIF images, etc.) so if we solve this here, that one can probably also be closed.

On the one hand, since Safari is the only browser that supports TIF, I could see an argument for going route 2 and essentially saying that UMIL does not support TIF images.

On the other hand, I wonder if some kind of image standardization/conversion would be useful. Short-term, this means not having to find new images for this initial set of instruments, which seems like something that we might not want to spend a bunch of time on at this juncture. Longer-term, it feels like support for more image formats rather than fewer would be in keeping with UMIL's ethos of (scare-quotes) "universality".

For example, images from an iPhone are in HEIC format, which a quick google search tells me is rather ill-supported on browsers. Support for a wider variety of image formats might certainly help increase the ease of contributing to UMIL.

This would fall squarely in the enhancement category, though, so we may decide this is a later-on-the-roadmap thing.

@fujinaga @yinanazhou @Monalisa98927 thoughts? And I know @kyrieb-ekat found these images in the first place so may have some thoughts about how impactful an image format restriction would be...

dchiller commented 1 month ago

Based on the discussion in #53, I'm going to adjust the name of the issue and put it "on hold".