-
Notifications
You must be signed in to change notification settings - Fork 1
Use PIL Image everywhere, replace numpy arrays #352
Copy link
Copy link
Open
Description
aydin-utting
opened on Apr 8, 2026
Issue body actions
- We use a mixture of PIL Images and numpy arrays
- The colour channels are BGR for numpy arrays and RGB for PIL images (mostly) and this confusion leads to incorrectly rendered images
- PIL images are probably the better choice, and they are arrays under the hood so it doesn't matter anyway.
- The first place that we render an image is the PDFDocument render_page function which uses numpy arrays. We should replace this with PIL.Image and then propagate that change through to everywhere else.
- We should replace the numpy array functions for cropping and rotating with PIL built in functions like PIL.ImageOps or just PIL.Image methods
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
This Sprint