tum месяцев назад: 11
Родитель
Сommit
7a2e670b98
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      app/report/gen_report.py

+ 3 - 3
app/report/gen_report.py

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