Fabrice-TIERCELIN commited on
Commit
a8fcff6
·
verified ·
1 Parent(s): a5a6e4f

Fix dimension

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -137,7 +137,7 @@ def uncrop(
137
  output_height = enlarge_top + original_height + enlarge_bottom
138
 
139
  # Enlarged image
140
- enlarged_image = Image.new(mode = input_image.mode, size = (original_height, original_width), color = "black")
141
  enlarged_image.paste(input_image, (0, 0))
142
  enlarged_image = enlarged_image.resize((output_width, output_height))
143
  enlarged_image = enlarged_image.filter(ImageFilter.BoxBlur(20))
@@ -209,7 +209,7 @@ def uncrop(
209
  minutes = minutes - (hours * 60)
210
  return [
211
  output_image,
212
- "Start again to get a different result. The new image is " + str(output_width) + " pixels large and " + str(output_height) + " pixels high, so an image of " + str(output_width * output_height) + " pixels. The image have been generated in " + str(hours) + " h, " + str(minutes) + " min, " + str(secondes) + " sec." + limitation,
213
  input_image,
214
  enlarged_image,
215
  mask_image
 
137
  output_height = enlarge_top + original_height + enlarge_bottom
138
 
139
  # Enlarged image
140
+ enlarged_image = Image.new(mode = input_image.mode, size = (original_width, original_height), color = "black")
141
  enlarged_image.paste(input_image, (0, 0))
142
  enlarged_image = enlarged_image.resize((output_width, output_height))
143
  enlarged_image = enlarged_image.filter(ImageFilter.BoxBlur(20))
 
209
  minutes = minutes - (hours * 60)
210
  return [
211
  output_image,
212
+ "Start again to get a different result. The new image is " + str(output_width) + " pixels large and " + str(output_height) + " pixels high, so an image of " + f'{output_width * output_height:,}' + " pixels. The image have been generated in " + str(hours) + " h, " + str(minutes) + " min, " + str(secondes) + " sec." + limitation,
213
  input_image,
214
  enlarged_image,
215
  mask_image