English
Forum

FindBytes () routine

 
Hi,
i'm noticed, that the FindBytes-commands no Bytes with
whom Values 01-15 find can (or Bytefolgen in them such
values vorkommen). Gibts for a reason or have I there
something wrong made? i want with the routine The position
bestimmter spots or Pixel-Areale within of/ one Bitmap search,
thereby come above-mentioned values probably too to. I
Have The routine with a Profan-area# and one
InitExtFX()-aray ausprobiert and ausserdem The Parameter-
surrender via Chr$(x) or one second aray, with same
Result.
MfG
Dieter
 
04/20/04  
 



Hi,

Frank is in the momentum in the leave (the happy !) therefore must You for the time being with me vorlieb take ;) or You wait To Frank again there's.

From one Error in FindBytes is me yet nothing deliberate ! Poste still time best the Codestück, I guck time whether I there what find can.

Moritz
 
04/20/04  
 



Hello Moritz,
only no incorrect Bescheidenheit, You can you gladly so
keep busy .here the code, The auskommentierten Lines on the
end Have so did i probiert. If you the Dispose memory# on the
beginning weglässt can you The routine too time on the Profan-
area testing. The part-Hexdump is a small Bitmap, with Paint prepares.
I have simply with the Hexeditor Bytefolgen reingeflickt and search let.
The Bytefolge 128 7 128 ought to on address $5D found go,
functions by me but not.
If one instead of the 7 on address $5E but a 8 setting and to
128 8 128 seek, then works again. or attempt time z.B. on
address $37 instead of the $10 something kleineres (except 8) To settle
and z.B. to 16 5 32 to search. with Einzelbytes is it just as.
if something unclear his ought to, login you.
Dieter
CompileMarkSeparation
Declare neu&,text$,such$,lenght&,breite&,höhe&,grösse&
Declare hdc1&,array1&,arrayadr1&
Declare memory#,bereich2#,pixpos&
Dim bereich2#,3
 $I Prospeed_Funktionen.inc
*** Profan Hauptprogramm
SetTrueColor 1
neu&=usedll("ProSpeed.dll")
rem
Window (%maxx/2-400),(%maxy/2-300)-800,600
Cls 0
*** Daten und Bitmaps laden und initieren
text$="12_17pixel.bmp"
rem
lenght&=@FileSize(text$)

If lenght&>0

    Dim memory#,lenght&
    ReadFileFast(addr(text$),memory#,0,lenght&)
    hdc1&=LoadExtMemory(memory#,lenght&)
    Dispose memory# Profan-Bereich

EndIf

array1&=InitExtFX(hdc1&)
rem Header auslesen
arrayadr1& = Long(array1&,40)
breite& = Long(array1&,4)
höhe& = Long(array1&,8)
grösse& = Long(array1&,20)
rem Suchparameter setzen + suchen
such$ = @Chr$(128)+@Chr$(7)+@Chr$(128)
pixpos& = FindBytes(arrayadr1&,0,grösse&,Addr(such$),3)
rem Ausgabe
Print lenght&,arrayadr1&,breite&,höhe&,grösse&
Print "Pos>";pixpos&
waitkey
pixpos& = @MemPos(memory#,0,such$)
string bereich2#,0= @Chr$(128)+@Chr$(0)+@Chr$(128)
byte bereich2#,0= 128
byte bereich2#,1= 1
byte bereich2#,2= 128
pixpos&=FindBytes(arrayadr1&,0,grösse&,Addr(such$),1)
pixpos&=FindBytes(arrayadr1&,0,grösse&,bereich2#,3)
00000000 42 4D 9A 02 00 00 00 00 00 00 36 00 00 00 28 00
00000010 00 00 0C 00 00 00 11 00 00 00 01 00 18 00 00 00
00000020 00 00 64 02 00 00 C4 0E 00 00 C4 0E 00 00 00 00
00000030 00 00 00 00 00 00 10 10 20 30 10 00 FF FF FF FF
00000040 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
00000050 FF FF FF FF FF FF FF 00 00 00 10 02 10 80 07 80
00000060 FF FF ../../function-references/XProfan/ff/'>FF
 
04/20/04  
 



so How I the now understood Have, seek You in the aray to a Pixel the whom Farbwert @rgb(128,7,128) has, or ?

then versteh I though The benutzung of @chr() to that together settle the Suchstrings not, these function supply you still letters back. in your Suchstring is then €|€ ! Can at all with a String to Bytefolgen search ? Have yet hardly with FindBytes worked, but the währ me new. shining but well still somehow To klappen, How You written have

Moritz
 
04/20/04  
 



Moritz,
it shining not somehow To klappen, its completely normal a Suchstring on these allocate Generate, differently could
one Yes defined Steuerzeichencodes not present. The Suchroutine GetControlParas (B whom String Yes again into ANSI-Codezahlen
circa and seek to this Zahlenwerten and not to letters. What the values letztendlich testify is irrelevant.
the Suchbeispiel Frank from the prospeed-Help could one
so or so prompt:
such$ = Frank or
such$ = @Chr$(70)+@Chr$(114)+@Chr$(97)+@Chr$(110)+@Chr$(107).
is both the same thing.
Übrigens have I Yes end the Listings The Suchcodes too with the byte area2#,x=y -commands
on a 2.area transfer and so (ergebnislos) sought.
I have your Einwand but nevertheless screen and thereby
found out that so did i something schieflag.
The FindBytes-routine can't only Werte<15 not find
separate stumbling over Suchwerte The not saponaceous through 8
divisible are (and yet some others, z.B. the value 88). this shining sooner on a problem inside the
Suchroutine hinzudeuten. the above-mentioned Suchbeispiel z.B. does not work for me.

MfG
Dieter
 
04/20/04  
 



Hi,

>>Die Suchroutine GetControlParas (B whom String Yes again into ANSI Codezahlen circa and seek to this Zahlenwerten and not to Buchstaben<<

Ahh, ok, the wusst I do not, then ergibts naturally again sense ! but Why some values not recognized go white so did i not, as long as tappt im dunkeln under 256 lying must it indeed no Problems give. must somehow a Inkompabilität between whom Ansi characters and the numbers his or something like, werds too test times, Have in the momentum but little Time, therefore well sooner tommorrow.

Moritz
 
04/20/04  
 



Hi,

short time from my leave... )
FindBytes() functions correctly, How the untenstehende example proving. as Result becomes 801 outputted.
If you others numbers into example overdo, become You too quick remember, the your theory with the niedrigen numbers and numbers, The through eight divisible are, wrong is.
CompileMarkSeparation
Declare neu&,x&,y&,z&,text$,bereich#,eingabe#
Dim bereich#,20001
Dim eingabe#,1024
*** Alle Dll-Funktionen einbinden
 $I Prospeed_Funktionen.inc
*** Profan Hauptprogramm
SetTrueColor 1
neu&=usedll("ProSpeed.dll")
WindowStyle 80
Window 0,0-800,600
Cls 0
Clear Eingabe#
String Eingabe#,0="120,128,7,128,124,125,126"
SetBytes(Bereich#,800,eingabe#)
text$=Chr$(128)+Chr$(7)+chr$(128)
x&=FindBytes(bereich#,0,20000,Addr(text$),3)
Print x&
WaitInput
freedll neu&
Dispose bereich#
Dispose eingabe#
END

How have you got the downstairs Hex-aray in your Beispielcode because at all created ? are the values the originalen Bitmap ? or one abgespeichertes byte-aray ?
you mußt know, the windows The Bitmaps as Bytes in a byte-aray with light Variationen einsetzt, from 128,7,128 becomes means slight 127,7,128, moreover goes The Pixel-Order in a Bytes-aray of under left under to right supra !
This is it To mind...
If I from my leave again home be (saturday), will be
I your example time accurate testing.

Moritz: I Have super weather and lots Fun...

Greeting, Frank
 
04/20/04  
 



>>Du must know, the windows The Bitmaps as Bytes in a byte-aray with light Variationen einsetzt, from 128,7,128 becomes means slight 127,7,128, moreover goes The Pixel-Order in a Bytes-aray of under left under to right supra !<<

This will the trouble his ! Ha, olle Bill Gates has time again guilt

Moritz
 
04/20/04  
 



Hello Frank,
you have completely right, the has me gedämmert as i later the example from the prospeed-Help 1:1 übernommen have
and time with Getpixel() of Screen gelesene data with a gespeicherten File compared have. means the was me Yes completely new.
I thought always Farbwert is Farbwert. The differences are so partly yet plenty stronger as in your example.
remaining a question, can The differences mathematically understand, d.h. can itself hereon leave
that The Abweichungen always same fall out or go The values of system sozusagen creative over the digitalen thumb gepeilt?
thanks incidentally for your speedy response, even from the leave.
MfG
Dieter
 
04/20/04  
 



hi,

byte-arrays manages prospeed intern always in 24 bit, windows incidentally too. with the umrechnung of 32 on 24 bit occur hold these small Error... as far as i know, can this behaviour in the system somewhere tuned go, white but not very, where...

frank,
the from the leave again there's, but unfortunately with of/ one schultereckgelenkssprengung, bänderriss in the shoulder ... next week Have I mean op..... must now with left write and mouse lenken...
 
04/20/04  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.427 Views

Untitledvor 0 min.
H.Brill12/24/16

Themeninformationen

this Topic has 1 subscriber:

unbekannt (10x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie