Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert current TIFF images to PNG #104

Open
zhannaklimanova opened this issue Jun 7, 2024 · 3 comments
Open

Convert current TIFF images to PNG #104

zhannaklimanova opened this issue Jun 7, 2024 · 3 comments
Assignees
Labels

Comments

@zhannaklimanova
Copy link
Contributor

zhannaklimanova commented Jun 7, 2024

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 zhannaklimanova added the bug Something isn't working label Jun 7, 2024
@zhannaklimanova zhannaklimanova self-assigned this Jun 7, 2024
@zhannaklimanova
Copy link
Contributor Author

@dchiller any advice?

@dchiller
Copy link
Contributor

dchiller commented Jun 7, 2024

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
Copy link
Contributor

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

@dchiller dchiller changed the title Images not being loaded into the webpage Convert current TIFF images to PNG Jun 10, 2024
@dchiller dchiller added on hold and removed bug Something isn't working labels Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants