From f4588ebda583bfa45e3ceb3dc5680b07fe9402d5 Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 26 Nov 2017 14:38:08 +0100 Subject: Add offset status info --- gerbimg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gerbimg.py b/gerbimg.py index d3ed7f9..50e33e4 100755 --- a/gerbimg.py +++ b/gerbimg.py @@ -85,10 +85,10 @@ def paste_image( offx += int(grbw*scale - imgw) // 2 offy += int(grbh*scale - imgh) // 2 endx, endy = min(offx+imgw, tgtw), min(offy+imgh, tgth) + print('off', (offx, offy), 'end', (endx, endy), 'img', (imgw, imgh), 'tgt', (tgtw, tgth)) padded_img[offy:endy, offx:endx] = source_img[:endy-offy, :endx-offx] debugimg(padded_img, 'padded') debugimg(target_img, 'target') - print('off', (offx, offy), 'end', (endx, endy), 'img', (imgw, imgh), 'tgt', (tgtw, tgth)) status_print('Masking source image') out_img = (np.multiply((padded_img/255.0), (target_img/255.0) * -1 + 1) * 255).astype(np.uint8) -- cgit