Ignore invisible sections of pictures

So I am using the Yanfly Picture Common Events plugin on some pictures of paintings where you are supposed to click on a certain part of the painting. I have a picture for the painting and then I added another picture of the part you are supposed to click on top. But in the second picture I have a bunch of empty space around it so I don't have to position it manually.
The problem is that when I tested the game, the empty space was counted as part of the picture and the common event triggered wherever I was clicking. So I'm just hoping that there's some way to focus on the part of the picture that is an actual picture without having to cut down the picture itself and try to go in and position it perfectly. I was planning on doing this a bunch of times and I don't think i would have the patience to do that, so any possibilities would be greatly appreciated.Also this is what I meant by empty space. I'm sure there's a term for it.
Please edit your post to include a link to the web page where you got that plugin. That way if anyone needs to check something before giving you advice, they won't have to go hunting.
@Arbeza

That's just how the plugin works. It takes the max width/height of the picture. It doesn't matter if it's Transparent (the empty space) or Colored. If you want to work around it, either you change the size of the image to only the clickable area or you learn programming and learn about things like Source Rect.
@Arbeza picture analysis (which means the computer tries to identify the contend of a picture file) is actually one of the more complex themes available - or why do you think there are so many millions put into facial recognicion software and that still has problems identifying?

As said above, there is no way for the computer to identify which part of the picture is transparent and which not, the computer can only detect the picture dimensions automatically. And that programming mentioned would be you as the programmer telling the computer what else to use as a targeting pointer.
Okay, I see. Thank you for all of your help.
Save this as a .js file and import as a plugin (load after YEP_PictureCommonEvents), seems to work for me:
Spoiler
Code:
(function(alias) {
'use strict';
	Game_Picture.prototype.isTriggered = function() {
		let r = alias.call(this);
		let p = SceneManager._scene.getPictureSprite(this);
		if (!r || !p) return r;
		let o = this.getSpriteRect(p);
		let x = this.getLocalTouchInputX() - o.x;
		let y = this.getLocalTouchInputY() - o.y;
		let a = p.bitmap.getAlphaPixel(x, y);
		return r && a !== 0;
	};
})(Game_Picture.prototype.isTriggered);
This'll ignore fully-transparent pixels of a picture. Still exhibits a weird priority thing where lower pictures register before higher ones, though; I'll see if I can upgrade into a "proper" extension plugin at some point~ 😮‍💨

[Edit: updated, fixed, "full" version in follow-up post below~]
So I added the code as a plugin and I tried with and without it on. When it was on, the picture, which was colored, did not respond at all. I'm not sure if I did it correctly, but thanks anyway. I will keep trying in different arrangements.
👋 I realised I had some oversights re picture scale and rotation; patched those up, tidied stuff up a bit, and tested a bit more. I think this ought to work: view/download file (Google Drive)
Spoiler: Embedded file (CaeX_YEPClickThruPic.js)

If you're still having problems, you can press F8 during playtest to show the console window. This will display any errors in red text: if there are any errors displayed, it could be helpful to share a screenshot of that window here to help work out the source of the problem. 🙂
That worked! I'm sorry you had to go and make a whole entire plugin but thank you so so much.

Original thread: https://forums.rpgmakerweb.com/threads/ignore-invisible-sections-of-pictures.110410/