This adds a image factory "StyledPilImage" which can paint QR codes with different color schemes, with different module shapes, and with an embedded image. See the updated README for example usages, and see the added images for examples of what the different styling options can do.
I modified the make_image function a bit to pass in the "context" of a given module if the image factory wants the context (used to determine what neighboring modules also need to be painted, for determining shapes), and to call a "process" function afterwards again only if the image factory wants for processing. It should leave present behavior in place, but allow for more complicated image factories (including StyledPilImage).
This is my first PR, so I'm probably doing something wrong, apologies for that. And thanks for an awesome and relatively intuitive library!
Changing the module drawers:
Changing the color masks:
This adds a image factory "StyledPilImage" which can paint QR codes with different color schemes, with different module shapes, and with an embedded image. See the updated README for example usages, and see the added images for examples of what the different styling options can do.
I modified the make_image function a bit to pass in the "context" of a given module if the image factory wants the context (used to determine what neighboring modules also need to be painted, for determining shapes), and to call a "process" function afterwards again only if the image factory wants for processing. It should leave present behavior in place, but allow for more complicated image factories (including StyledPilImage).
This is my first PR, so I'm probably doing something wrong, apologies for that. And thanks for an awesome and relatively intuitive library!
Changing the module drawers: Changing the color masks: