Amamrnaf commited on
Commit
a598534
·
1 Parent(s): 182218c

`Fixed image cropping coordinates in Noc_timeSheet_pdf_to_img function`

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -22,8 +22,8 @@ def Noc_timeSheet_pdf_to_img(pdf_path,dpi: int = 300, quality: int = 95):
22
  start_y_total_table = int(height * 0.42)
23
  end_y_first_table = int(height * 0.30)
24
 
25
- croped1 = image.crop((0, 0, 0, end_y_first_table))
26
- croped2 = image.crop((0, start_y_total_table, 0, height))
27
  upper_width, upper_height = croped1.size
28
  lower_width, lower_height = croped2.size
29
  combined_image = Image.new('RGB', (upper_width, upper_height + lower_height))
 
22
  start_y_total_table = int(height * 0.42)
23
  end_y_first_table = int(height * 0.30)
24
 
25
+ croped1 = image.crop((0, 0, width, end_y_first_table))
26
+ croped2 = image.crop((0, start_y_total_table, width, height))
27
  upper_width, upper_height = croped1.size
28
  lower_width, lower_height = croped2.size
29
  combined_image = Image.new('RGB', (upper_width, upper_height + lower_height))