dlcs / appetiser

Replacement for jp2iser/tizer
2 stars 0 forks source link

Flag for progressive downscaling on/off #7

Open donaldgray opened 4 years ago

donaldgray commented 4 years ago

PR #4 fixed a scaling issue by removing progressive downscaling.

This ensures that the returned values are correct but takes slightly longer to calculate. If the calling system is aware of what the sizes should be, then they may be willing to accept a slight margin for error in the returned values. Have a flag to allown progressive downcaling to be enabled/disabled depending on needs of consuming app.

Either on startup or per request? Or a default of 'correct', but can be overriden per request.

stephenwf commented 4 years ago

Reducing gap could help maintain performance: https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Image.thumbnail