Bladeren bron

gen_report

tum 11 maanden geleden
bovenliggende
commit
7a2e670b98
1 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 3 3
      app/report/gen_report.py

+ 3 - 3
app/report/gen_report.py

@@ -195,7 +195,7 @@ def gen_xlsx(template_file, selected_sheets, prefix_filename, data):
195 195
                                 original_width, original_height = pil_img.size
196 196
 
197 197
                                 # Desired height (e.g., 40), calculate the new width to maintain aspect ratio
198
-                                desired_height = 40
198
+                                desired_height = 30
199 199
                                 aspect_ratio = original_width / original_height
200 200
                                 new_width = int(desired_height * aspect_ratio)
201 201
 
@@ -213,7 +213,7 @@ def gen_xlsx(template_file, selected_sheets, prefix_filename, data):
213 213
                         elif value is True:
214 214
                             img = Image(checked_image_path)
215 215
                             img.width = pixels_to_points(20)
216
-                            img.height = pixels_to_points(15)
216
+                            img.height = pixels_to_points(10)
217 217
 
218 218
                             # img.width = 15
219 219
                             # img.hegiht = 10
@@ -227,7 +227,7 @@ def gen_xlsx(template_file, selected_sheets, prefix_filename, data):
227 227
                             # img.width = 15
228 228
                             # img.height = 10
229 229
                             img.width = pixels_to_points(20)
230
-                            img.height = pixels_to_points(15)
230
+                            img.height = pixels_to_points(10)
231 231
                             # sheet.add_image(img, cell.coordinate)
232 232
                             # set_image_with_offset(sheet, img, cell.coordinate, offset_x=100)
233 233
                             center_image_in_cell(sheet, img, cell.coordinate, )