BiomedicalMachineLearning / stLearn

A novel machine learning pipeline to analyse spatial transcriptomics data
Other
176 stars 23 forks source link

Allow saving tiles as PNG images in `stlearn.pp.tiling` #257

Closed jbschiratti closed 6 months ago

jbschiratti commented 8 months ago

Currently, stlearn.pp.tiling (link) saves image tiles as JPEG files using:

tile.save(out_tile, "JPEG")

With Pillow, as per the documentation, the default value of the JPG quality parameter is 75. In some cases, it might be preferable to save tiles using a lossless image format such as PNG.

What about allowing users to save tiles as PNG images instead?

I can submit a PR to add this feature.

duypham2108 commented 8 months ago

It will be a good option. All contribution is welcome. Thank you