Skip to content

Commit

Permalink
Change ANTIALIAS to LANCZOS in asset label generator
Browse files Browse the repository at this point in the history
  • Loading branch information
jb3 committed Oct 29, 2024
1 parent 6c32db3 commit 99e1fbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def generate_label(pk):
barcode = Code39(str(obj.asset_id), writer=ImageWriter())

logo_size = (200, 200)
image.paste(logo.resize(logo_size, Image.ANTIALIAS), box=(5, 5))
image.paste(logo.resize(logo_size, Image.LANCZOS), box=(5, 5))
barcode_image = barcode.render(writer_options={"quiet_zone": 0, "write_text": False})
width, height = barcode_image.size
image.paste(barcode_image.crop((0, 0, width, 100)), (int(((size[0] + logo_size[0]) - width) / 2), 40))
Expand Down

0 comments on commit 99e1fbb

Please sign in to comment.