hipspy / hips

Python library to handle HiPS
https://hips.readthedocs.io
12 stars 16 forks source link

Drawing JPG, PNG tiles #62

Closed adl1995 closed 7 years ago

adl1995 commented 7 years ago

For drawing the higher dimensional tiles such as JPG and PNG, the empty image's shape in draw_sky_image would have to be altered. This shape currently comes from WCSGeometry class. However, this is always 2 dimensional. To handle multi-dimentional tiles, I'm thinking of adding them manually, i.e. 3 extra dimensions in case of JPG tiles and 4 extra dimensions in case of PNG tiles.

@cdeil @tboch If you have an alternative / better suggestion, please share.

cdeil commented 7 years ago

For drawing the higher dimensional tiles such as JPG and PNG, the empty image's shape in draw_sky_image would have to be altered. This shape currently comes from WCSGeometry class. However, this is always 2 dimensional.

For drawing RGB images, two different shapes are needed in different places of the code:

To handle multi-dimentional tiles, I'm thinking of adding them manually, i.e. 3 extra dimensions in case of JPG tiles and 4 extra dimensions in case of PNG tiles.

I don't know how to handle this best yet, and I have no idea what you mean by "adding them manually". My suggestion is that you start a PR, start by adding a (failing) test case and then try to do minimal changes to the existing code to make it work for RGB images, asking for help on the PR as you go.

The core question is if the scikit-image warp function can process 3-dim or not.

@adl1995 - Does this help you get started?

cdeil commented 7 years ago

Implemented by @adl1995 in #63