Omnibus commited on
Commit
3778fe1
1 Parent(s): 77a7427

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -42,7 +42,12 @@ def get_concat_h_cut(in1, in2, pos_x,pos_y):
42
  #im1=in1
43
  #im2=in2
44
  #dst = Image.new('RGB', (im1.width + im2.width, min(im1.height, im2.height)))
45
- dst = Image.new('RGB', (im2.width*pos_x, im2.height*pos_y))
 
 
 
 
 
46
  dst.paste(im1, (0, 0))
47
  dst.paste(im2, (im2.width*pos_x, im2.height *pos_y))
48
  return dst
 
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, (im2.width*pos_x, im2.height *pos_y))
53
  return dst