Omnibus commited on
Commit
4cad471
·
1 Parent(s): cd4e135

Update stegan.py

Browse files
Files changed (1) hide show
  1. stegan.py +3 -1
stegan.py CHANGED
@@ -95,7 +95,9 @@ def conv_im(im,data):
95
  imgh = img1.size[1]
96
  print (f'qr Size:{img1.size}')
97
  #img1.thumbnail((imgw*4,imgh*4), Image.Resampling.LANCZOS)
98
- img1 = img1.resize((int(data_pad),int(data_pad)), Image.Resampling.LANCZOS)
 
 
99
  print (img1.size)
100
  img1.save(f'tmpim{uniqnum}.png')
101
 
 
95
  imgh = img1.size[1]
96
  print (f'qr Size:{img1.size}')
97
  #img1.thumbnail((imgw*4,imgh*4), Image.Resampling.LANCZOS)
98
+ if imgw > data_pad or imgh > data_pad:
99
+
100
+ img1 = img1.resize((int(data_pad),int(data_pad)), Image.Resampling.LANCZOS)
101
  print (img1.size)
102
  img1.save(f'tmpim{uniqnum}.png')
103