I ask AI to create Hash for an image.
- Code: Select all Expand view RUN
- FUNCTION GetImageHash(cFileName)
LOCAL nHandle, cBuffer, nHash, nByte, i
nHandle := FOPEN(cFileName, 0) // Dosyayı okumak için aç
IF nHandle < 0
? "Dosya açılamadı"
RETURN NIL
ENDIF
nHash := 0
DO WHILE FREAD(nHandle, @cBuffer, 1) > 0
nByte := ASC(cBuffer)
nHash := BITOR(BITLSHIFT(nHash, 5) - nHash, nByte)
ENDDO
FCLOSE(nHandle)
RETURN nHash
Change BITOR to hb_BITOR, BITLSHIFT to hb_BITSHIFT.
I could not get any result. Can you help me?
Thanks