Shrink label size to allow support for nvme drives #19

Merged
localhorst merged 4 commits from feature/nvme-label into main 2025-06-22 13:34:16 +02:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit 880ff8c6e3 - Show all commits

View File

@ -142,7 +142,7 @@ def draw_text(drawable, printable_data, font_regular, font_bold, font_bold_bigge
label_x = TEXT_X_OFFSET label_x = TEXT_X_OFFSET
value_offset = 115 value_offset = 115
right_field_spacing = 200 # Horizontal gap between Cycles and Errors right_field_spacing = 200 # Horizontal gap between Cycles and Errors
x_capacity = 510 x_capacity = 520
y_capacity = 142 y_capacity = 142
y_start = 4 y_start = 4
@ -297,8 +297,8 @@ def generate_image(drive, rehdd_info, output_file):
output_image = Image.new("1", (OUTPUT_WIDTH, OUTPUT_HEIGHT), "white") output_image = Image.new("1", (OUTPUT_WIDTH, OUTPUT_HEIGHT), "white")
draw = ImageDraw.Draw(output_image) draw = ImageDraw.Draw(output_image)
font_regular = ImageFont.truetype(find_font_path(DEFAULT_FONT_REGULAR), 18) font_regular = ImageFont.truetype(find_font_path(DEFAULT_FONT_REGULAR), 20)
font_bold = ImageFont.truetype(find_font_path(DEFAULT_FONT_BOLD), 18) font_bold = ImageFont.truetype(find_font_path(DEFAULT_FONT_BOLD), 20)
font_bold_bigger = ImageFont.truetype(find_font_path(DEFAULT_FONT_BOLD), 42) font_bold_bigger = ImageFont.truetype(find_font_path(DEFAULT_FONT_BOLD), 42)
draw_outline(draw, 0, 3, OUTPUT_WIDTH+1, OUTPUT_HEIGHT+1) draw_outline(draw, 0, 3, OUTPUT_WIDTH+1, OUTPUT_HEIGHT+1)
@ -320,7 +320,7 @@ def main():
drive_state="shredded", drive_state="shredded",
modelfamily='Toshiba 2.5" HDD MK..65GSSX', modelfamily='Toshiba 2.5" HDD MK..65GSSX',
modelname="TOSHIBA MK3265GSDX", modelname="TOSHIBA MK3265GSDX",
capacity=343597383600, capacity=343597383000,
serialnumber="YG6742U56UDRL123456789ABCDEFGJKL", serialnumber="YG6742U56UDRL123456789ABCDEFGJKL",
power_on_hours=7074, power_on_hours=7074,
power_cycle=4792, power_cycle=4792,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB