rootglitch commited on
Commit
143a0f1
·
1 Parent(s): b6dd888

Modified resize image to return image correctly

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -457,11 +457,7 @@ def resize_to_square(image, size=1024):
457
  # Paste the resized image onto the square canvas with the correct transparency mask
458
  square_img.paste(img, (x_offset, y_offset), mask)
459
 
460
- # Save if output_path is provided; otherwise, return the PIL Image object
461
- if output_path:
462
- square_img.save(output_path, "PNG")
463
- else:
464
- return square_img
465
 
466
 
467
  def encode_image(image):
 
457
  # Paste the resized image onto the square canvas with the correct transparency mask
458
  square_img.paste(img, (x_offset, y_offset), mask)
459
 
460
+ return square_img
 
 
 
 
461
 
462
 
463
  def encode_image(image):