SRL Archive - OSR Help

Bitmap Tolearnce


YoHoJo

2011-12-13 11:06:57

In you guys' experience How much tolerance is generally sufficient for finding a bitmap of an item in the inventory/bank etc?

Want it to always work, but also keep it as low as possible to stop it from finding wrong object.

Kyle Undefined

2011-12-13 11:13:18

It all depends on how you make the bitmap really, the bitmap of bronze arrows I made for my RangeGuilder works since I first created it before the major recent update.


BronzeArrowsBmp := BitmapFromString(10, 33, 'meJytUssKwjAQDCsigg+qFbFQqF' +
'poEYWeLCheFC/ePHjx4B/5zy4duuRVwUcIZTKzM7slUerXRT5M9Td' +
'cbIRkDBCt90xO0iKIM6rKgKEuD1feo2Q1mM2pOgJDzU73pLxM8y1v' +
'qMBQW8Oom5/JnArL4hkUu6OobCSnGGVNgVBh1IuVYwRpdRcjyrwdG' +
'bj5/zJa6kdG+SOvUQbzGkG+N/bHD95NRpbandQ1YiTdiBxdDeMnjC' +
'JJLz0KpEjKjKI6Si7UilLmgxGVx3YfUi+4MemVlHYRX6wXd5Uwgw==');

WriteLn('Looking for arrows...');

if FindBitmapToleranceIn(BronzeArrowsBmp, x, y, MIX1, MIY1, MIX2, MIY2, 10) then

Wizzup?

2011-12-13 11:16:07

I've been thinking, if the items are still shrinking and growing, we could create a function that would perhaps also incorporate shrinking and growing of bitmaps, but would not be as heavy as finddeformed.

YoHoJo

2011-12-13 11:16:43

Making bitmap for ores, planning to use a chunk of the middle piece of the ore (the one that's actually the color of the ore and not just 'rock color) and include a bit of the black outline color on one edge of the bitmap too.

Just don't want to confuse tin with silver or something like that.

E: Wizzup.
The VERY SMALL shrinking bug no longer happens that only happened for a few days.
Sometimes items are a bit deformed though (usually just the left side of them) seems as if there is a imaginary square around them and the left side is bunched up against the square. Jagex is aware of all of these weird little item display problems and is going to fix them.

Kyle Undefined

2011-12-13 11:23:45

You really don't need the black outline, just make a box around the color of the ore with the rest filled in with black. Should work very well.

YoHoJo

2011-12-13 11:25:55

Seems like having a bit of the black outline would be nice.
Just having like a blob of the brown iron ore color seems like it could be confused for a lot of other items, but including a bit of the black outline will set it apart from others.
What do you mean rest filled black? Why not just like a 'square of brown' for iron ore?

Kyle Undefined

2011-12-13 11:30:22

Ore always has the same shape right? The only difference is the color. I would take one of the smaller pieces of ore color (The pieces that look broken up) and make a bitmap around that.

Your square idea might be even better though :)

Wyn

2011-12-13 11:51:11

I use 40 with 3 by 4 bitmaps.