Omnibus commited on
Commit
5124fde
1 Parent(s): 57985d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -39,15 +39,22 @@ def get_concat_h_cut(in1, in2, pos_x,pos_y):
39
  im2=Image.open(in2)
40
  pos_x=int(pos_x)
41
  pos_y=int(pos_y)
 
 
42
  #im1=in1
43
  #im2=in2
44
  #dst = Image.new('RGB', (im1.width + im2.width, min(im1.height, im2.height)))
45
  width_tog=1
46
  height_tog=0
 
 
 
 
 
47
  if pos_y > 0:
48
- width_tog = 0
49
-
50
- dst = Image.new('RGB', (im1.width + (im2.width*width_tog), im1.height+(im2.height*pos_y)))
51
  dst.paste(im1, (0, 0))
52
  dst.paste(im2, (im1.width, im2.height *pos_y))
53
  return dst
 
39
  im2=Image.open(in2)
40
  pos_x=int(pos_x)
41
  pos_y=int(pos_y)
42
+ print(f'pos_x:: {pos_x}')
43
+ print(f'pos_y:: {pos_y}')
44
  #im1=in1
45
  #im2=in2
46
  #dst = Image.new('RGB', (im1.width + im2.width, min(im1.height, im2.height)))
47
  width_tog=1
48
  height_tog=0
49
+ width_var = im2.width
50
+ height_var=0
51
+ if pos_y > 0 and pos_x==0:
52
+
53
+ height_var = im2.height
54
  if pos_y > 0:
55
+ width_var = 0
56
+
57
+ dst = Image.new('RGB', (im1.width + width_var, im1.height+height_var))
58
  dst.paste(im1, (0, 0))
59
  dst.paste(im2, (im1.width, im2.height *pos_y))
60
  return dst