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

Add support for TIFF images in image upload process #53

Open
dchiller opened this issue Oct 6, 2023 · 7 comments
Open

Add support for TIFF images in image upload process #53

dchiller opened this issue Oct 6, 2023 · 7 comments

Comments

@dchiller
Copy link
Contributor

dchiller commented Oct 6, 2023

Images that are uploaded in the TIFF format should be converted (with transparency to the user) to PNG format for storage and later use.

@dchiller
Copy link
Contributor Author

Turns out only safari supports tiff images, and maybe not even officially! (https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types#tiff_tagged_image_file_format)

Since I don't think it makes sense for VIM to support an image format that a good chunk of potential user's browsers won't, closing this issue.

@dchiller dchiller changed the title Tiff images are not displayed in the instrument gallery view Support on-the-fly conversion of TIF images Oct 12, 2023
@dchiller dchiller reopened this Oct 12, 2023
@fujinaga
Copy link
Member

Ideally, contributors should be able to upload any image file format on any popular browsers.
We should convert all images to PNG (on the fly), unless the original was in JPEG, in which case, we can keep it in JPEG. We should do this transparently to the contributors and only let them know if we do not support the file format (e.g., text files and video files). We should allow video file uploads, but let's think about that later.
Create separate issues for uploading each file format. Start with PNG and JPEG then TIFF, etc.

As I mentioned to @Monalisa98927 there should be a second set of these images for initial display on the web page (in smaller JPEG files) for fast loading of the images. The original higher-resolution files can be displayed when the user clicks on the image. There should be a separate issue for this.

@dchiller
Copy link
Contributor Author

We should convert all images to PNG (on the fly), unless the original was in JPEG, in which case, we can keep it in JPEG.

What do you mean by on-the-fly here? At request time?

@fujinaga
Copy link
Member

No, when the contributor is uploading to our website.
For example, if the contributor is uploading a TIFF file, we convert it to PNG and not keep the TIFF file.

@dchiller
Copy link
Contributor Author

Ok, UMIL does not currently have any infrastructure for storing images, so that's probably a first order problem (no point in converting stored images if we don't store them anywhere)?

I think we can probably hold off on dealing with our existing TIFF images until that is done?

@fujinaga
Copy link
Member

Ok, UMIL does not currently have any infrastructure for storing images, so that's probably a first order problem (no point in converting stored images if we don't store them anywhere)?

Correct. We need the "Contribute New Instrument" page.

I think we can probably hold off on dealing with our existing TIFF images until that is done?

Yes.

@dchiller
Copy link
Contributor Author

dchiller commented Jun 10, 2024

Thanks

I've adjusted #53 to involve converting existing TIFF images to PNG once the converter and image storage situation exists.

I've also opened:

I've also updated the name of this issue.

@dchiller dchiller changed the title Support on-the-fly conversion of TIF images Add support for TIFF images in image upload process Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants