mirror of
https://github.com/horsicq/Detect-It-Easy.git
synced 2026-06-24 01:54:08 +00:00
14 lines
No EOL
468 B
Text
Executable file
14 lines
No EOL
468 B
Text
Executable file
// Read the bits per pixel of Windows cursors & icons from the image.
|
|
|
|
// nOffset: position of the header.
|
|
function getCurIcoBPP(nOffset) {
|
|
var nBPP = 0;
|
|
nOffset = Binary.readDword(nOffset + 12);
|
|
if (Binary.readDword(nOffset) == 0x28) {
|
|
nBPP = Binary.readWord(nOffset + 14);
|
|
} else if (Binary.compare("89'PNG\r\n'1A0A", nOffset)) {
|
|
// Just assume a PNG is going to be 8-bit RGBA.
|
|
nBPP = 32;
|
|
}
|
|
return nBPP;
|
|
} |