izuemon commited on
Commit
c8e68e8
·
verified ·
1 Parent(s): 105b753

Update turbowarp-server/qr-converter.py

Browse files
Files changed (1) hide show
  1. turbowarp-server/qr-converter.py +3 -3
turbowarp-server/qr-converter.py CHANGED
@@ -122,14 +122,14 @@ def generate_image(prompt):
122
 
123
  def resize_and_encode(img):
124
  """90x90にリサイズして6桁の数字列に変換(各ピクセル6桁)"""
125
- img = img.resize((110, 110))
126
  #print("[INFO] Resized image to 90x90.")
127
 
128
  encoded = ""
129
  total_pixels = 0
130
 
131
- for y in range(110):
132
- for x in range(110):
133
  pixel = img.getpixel((x, y))
134
  # RGB値を取得(RGBAの場合はRGBのみ使用)
135
  if len(pixel) >= 3:
 
122
 
123
  def resize_and_encode(img):
124
  """90x90にリサイズして6桁の数字列に変換(各ピクセル6桁)"""
125
+ img = img.resize((90, 90))
126
  #print("[INFO] Resized image to 90x90.")
127
 
128
  encoded = ""
129
  total_pixels = 0
130
 
131
+ for y in range(90):
132
+ for x in range(90):
133
  pixel = img.getpixel((x, y))
134
  # RGB値を取得(RGBAの場合はRGBのみ使用)
135
  if len(pixel) >= 3: