BryceTheCoder Posted May 26, 2012 Share Posted May 26, 2012 Ok soo i was on the Wiki trying to find more about Bitmap stuff anndd i have honestly very little clue on it.. Does it try and find an color? Like FindColorTolerance oorr what? This is what reminded me of Bitmap stuff: existing := BitmapFromString(15, 5, 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000' + '000000000000000000000000000000000000FFFFFFFFFFFF000000' + '000000000000000000000000000000000000000000000000000000' + '000000000000000000FFFFFFFFFFFF000000000000000000000000' + '000000000000000000000000000000000000000000000000000000' + 'FFFFFFFFFFFF000000000000000000000000000000000000000000' + '000000000000000000000000000000000000FFFFFFFFFFFFFFFFFF' + 'FFFFFF000000000000000000FFFFFFFFFFFF000000000000FFFFFF' + 'FFFFFF000000000000'); All this random numbers and letters make no sence to me:/ How do you get these and what would you use Bitmaps for? Finding an object oorr? Idk.. i just need some knowledge on it is all:) Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted May 27, 2012 Share Posted May 27, 2012 Not exactly. It is trying to find an image, rather than a color. The basic idea is you create an bitmap image of something you want to look for (such as a symbol on the minimap) then search for that image rather than the color of whatever it is you are looking for. Just a alternate way of searching. I would likely use dtms rather than a bitmap, but each has it pros and cons. Look under the Tools menu in SCAR: It has an option to take that string and turn it back into what the original bitmap image is (string to picture) so you can visualize it. Conversely when you are creating one you can use the other tool (picture to string) to turn your search image into a string SCAR can work with. I am not the best one to explain this. I suck at explaining things. Quote Link to comment Share on other sites More sharing options...
Ulquiorra Posted May 27, 2012 Share Posted May 27, 2012 I would like to know what it does and all that. (I already know how to use bitmaps) It has hex, so it is probably related to bits. I am guessing colors and stuff. Thanks. Help? Quote Link to comment Share on other sites More sharing options...
FHannes Posted May 27, 2012 Share Posted May 27, 2012 I'd love to give a detailed explanation about the subject, but at the moment I'm preparing for my finals, so I don't have time to do so. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted May 28, 2012 Share Posted May 28, 2012 (edited) Heres a Explanation of decoding by Freddy a few months ago posted in FAQ's http://forums.scar-divi.com/showthread.php?914-Bitmap-Encoding&highlight=bitmap%20encoding Heres a summary and a little more information: Scar takes each pixel of the bitmap row by row and analyzed the colors into RGB values each RGB value is then turned into a ANSI character. For instance if the R value was 67 then scar would put "c" and if the G value was 94 then scar would put "^" B value was 82 then scar would put "s" so when the pixel was fully encoded you would end up with "c^s" as the bitmap string and this would go on until all the pixels in the bitmap were finished. Then the string of ansi chars would be compressed with some compression software and used ect.. This is for the "c" type encoding system which has a "c" at the begging of the string. Read the full article to see a working example from freddy! =) Edited May 28, 2012 by shadowrecon Quote Link to comment Share on other sites More sharing options...
FHannes Posted May 28, 2012 Share Posted May 28, 2012 The bitmap he's got up there is actually the oldest type SCAR ever used, it's just a sequence of hex encoded colors. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted May 28, 2012 Share Posted May 28, 2012 The bitmap he's got up there is actually the oldest type SCAR ever used, it's just a sequence of hex encoded colors. Yeah i know, because the 'c' at the beginning of the string is missing, but he was just asking the in's and outs of bitmaps. Bixby covered the making/retrieving, and i was just trying to explain what the numbers and letters represent because i think the bitmap he posted is just a bunch of random numbers because string to picture just returns a black bitmap with a few white dots. Quote Link to comment Share on other sites More sharing options...
FHannes Posted May 28, 2012 Share Posted May 28, 2012 You can decrypt this type of bitmap very easily: [scar]var Bmp, W, H, I, Color: Integer; Str, Tmp: AnsiString; begin Str := 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000' + '000000000000000000000000000000000000FFFFFFFFFFFF000000' + '000000000000000000000000000000000000000000000000000000' + '000000000000000000FFFFFFFFFFFF000000000000000000000000' + '000000000000000000000000000000000000000000000000000000' + 'FFFFFFFFFFFF000000000000000000000000000000000000000000' + '000000000000000000000000000000000000FFFFFFFFFFFFFFFFFF' + 'FFFFFF000000000000000000FFFFFFFFFFFF000000000000FFFFFF' + 'FFFFFF000000000000'; W := 15; H := 5; Bmp := BitmapFromString(W, H, ''); try for I := 0 to Length(Str) div 6 - 1 do begin Tmp := HexToStr(Copy(Str, I * 6 + 1, 6)); Color := RGBToColor(Byte(Tmp[1]), Byte(Tmp[2]), Byte(Tmp[3])); FastSetPixel(Bmp, I mod W, I div W, Color); end; DebugBitmap(Bmp); finally FreeBitmap(Bmp); end; end.[/scar] Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted May 28, 2012 Author Share Posted May 28, 2012 Wow thnx guys:) And no, Bixby Sayz, you did excellent on explaining things. And thnx u agagin Freddy and shadowrecon Quote Link to comment Share on other sites More sharing options...