QR Code image generator with customizable image formats, error correction levels, and styling options
A utility for generating product QR codes that encode product information and save them as PNG images with custom colors.
Generate QR codes for product URLs and save them as PNG image files. The QR codes should be generated with appropriate size and border settings for easy scanning.
Generate QR codes with custom foreground and background colors to match branding requirements. The output should be in PNG format with the specified colors applied.
Generate QR codes with configurable box sizes and border widths to control the overall dimensions and appearance of the output PNG images.
@generates
def generate_product_qr(url: str, filename: str,
fill_color: tuple = (0, 0, 0),
back_color: tuple = (255, 255, 255),
box_size: int = 10,
border: int = 4) -> None:
"""
Generate a QR code for a product URL and save it as a PNG file.
Args:
url: The product URL to encode in the QR code
filename: The output PNG filename
fill_color: RGB tuple for the QR code foreground color (default: black)
back_color: RGB tuple for the QR code background color (default: white)
box_size: Size of each box in pixels (default: 10)
border: Border size in boxes (default: 4)
Returns:
None (saves the PNG file to disk)
"""
passProvides QR code generation with PIL/Pillow PNG output support.
@satisfied-by
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10