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

Improve image handling #45

Open
davidcsterratt opened this issue Dec 7, 2019 · 1 comment
Open

Improve image handling #45

davidcsterratt opened this issue Dec 7, 2019 · 1 comment
Assignees
Milestone

Comments

@davidcsterratt
Copy link
Owner

The aim of this proposal are:

  1. Make it easy to have multiple images in a directory and switch between them in the GUI
  2. Not save images in the r.Rdata files
  3. Read TIFF as well as PNG files

This could be achieved by:

  1. Modifying read.image() to read information about images in the directory. It would throw an error if all images do not have the same dimensions, and it would return a list of image file names, and the common dimensions.
  2. Store the dimensions in the Outline object
  3. Only load images at the time of rendering. The Outline function getImage() could be modified to take an argument (image file name), defaulting to the first in alphabetical order. This would then load the image, cache it in Outline$im and proceed as now. A record of the cached image name would be kept in the Outline object.

Ideally point (1) requires some code to read image metadata without reading the whole image.

@davidcsterratt davidcsterratt self-assigned this Dec 9, 2019
@davidcsterratt davidcsterratt added this to the 0.6.2 milestone Dec 9, 2019
@davidcsterratt
Copy link
Owner Author

The R magick package looks like it would provide the code for (1), and would also read various formats of image file: https://cran.r-project.org/web/packages/magick/index.html
It does require Linux and Mac users to install the imagemagick libraries, but there are instructions on how to do this.

@davidcsterratt davidcsterratt modified the milestones: 0.6.3, 0.10.0 Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant