MegaBotopolis

Author Topic: FindBitmap Functions  (Read 653 times)

Offline Nymphis

  • Goblin Elite Warrior
  • ***
  • Posts: 22
FindBitmap Functions
« on: April 07, 2018, 03:41:06 AM »
Hi There
So i have been using MG for a long time now and have had a ton of fun creating macros for games.
A few days ago I upgraded my Video card to a new 1080GTX and since the upgrade I can not seem to get the FindBitmap Functions to work.

I thought with the new video card I would need to create new icon BMP as the old ones may not work(although my Monitor is exactly the same), but even with new BMP's created the FindBitmap Function will not find the BMP.
The game I mostly use them on is BDO. Has anyone heard if BDO patched something that was cause the FindBitmap Functions to not work :(

Any help on this would be greatly appreciated.

Offline Jack

  • Administrator
  • Goblin Zealot
  • *****
  • Posts: 15418
Re: FindBitmap Functions
« Reply #1 on: April 07, 2018, 01:28:15 PM »
Hi, I can't test your graphics card but you can usually get things to work by changing some of the function parameters like ColorVariance or PercentMatch

Offline Nymphis

  • Goblin Elite Warrior
  • ***
  • Posts: 22
Re: FindBitmap Functions
« Reply #2 on: April 07, 2018, 08:28:55 PM »
Thanks Jack
I was planning to sit down and do some testing today.

I'll let you know wait I find.

Offline Nymphis

  • Goblin Elite Warrior
  • ***
  • Posts: 22
Re: FindBitmap Functions
« Reply #3 on: April 09, 2018, 05:46:18 AM »
So I did some testing today.

I guess first I should explain.
The FindBitmap Functions I have been using with BDO (Black Desert Online)  for 2 years now and they have been working fine.
I use them for Spell rotations and for finding Icon in the inventory, and as I mention its be perfect for 2 years.

The only thing that has changed in the past 4 days is I have installed a 1080GTX card and there has been an update to BDO.

So testing...
The FindBitmap Functions works perfect on all my other games.
In BDO...No matter what variances I use...it can not find the BMP (new BMP were created)
I even took a screenshot and tried to find icons on the screen shot. (new window setup for photo-viewer) Still no luck.

So I am left with a couple of question.
1/ is it possible BDO could have done something with there graphics that wold make FindBitmap Functions not work?
I find this hard to believe as a normal "ReadPixel(X,Y)" work fine

2/ is the graphic quality to good with the 1080 GTX for the FindBitmap Functions to work?
Again I find this hard to believe as they are just pixels...

I am at a loss as to the problem
is there anything else I could try?

Offline Jack

  • Administrator
  • Goblin Zealot
  • *****
  • Posts: 15418
Re: FindBitmap Functions
« Reply #4 on: April 09, 2018, 11:41:23 AM »
It might be possible for BDO to do that, but if ReadPixel works fine they probably didn't. The graphic quality shouldnt be too good for the function, unless it uses some non-standard display method in windows.

The only ohter thing i can think of, which you've probably already done, is to make sure you're running windows in a non-aero them. Aero is the them where the window borders can be semi-transparent but it also messes with pixel reading functions. Go to some simple solid window border theme if possible.

Offline Nymphis

  • Goblin Elite Warrior
  • ***
  • Posts: 22
Re: FindBitmap Functions
« Reply #5 on: April 11, 2018, 07:44:27 AM »
Hi Jack
Thank you for your reply.
I normally play game in full screen windows, but I'll check out the Aero setting.

I was planning do test some more ideas this weekend. I'll keep up posted if I find anything :)

Offline Nymphis

  • Goblin Elite Warrior
  • ***
  • Posts: 22
Re: FindBitmap Functions
« Reply #6 on: April 21, 2018, 05:49:32 AM »
Hi Jack
So after some testing today I worked it out.

It seems the quality of Image in BDO with the new 1080GTX card is so good that the standard Windows Paint can not be used to crop and save the BMP images.
I tried it with GIMP and the FindBitMap Function is working as intended.

Its weird, but you can definitely see the difference between Cropping with Paint and GIMP.
I assume it worked before the graphic card upgrade because I was running the game at low settings, But with cropping the Icons/Images I need in Gimp I can now use very low settings on the ColorVariance...where before I would always have to be around 90 (which made the Function jump to incorrect icons at times)

So it seems like a good time to re-write a lot of the old code and freshen it up....Lucky for me I love the logic challenges :D

Keep up the great work Jack...MacroGoblin is Awesome :D



Offline Jack

  • Administrator
  • Goblin Zealot
  • *****
  • Posts: 15418
Re: FindBitmap Functions
« Reply #7 on: April 21, 2018, 12:25:24 PM »
That's interesting. glad you got it figured out