flat assembler
Message board for the users of flat assembler.
Index
> Windows > mmx & dib, nned help |
Author |
|
Vasilev Vjacheslav 22 Nov 2005, 08:17
does anybody knows how to create mask of pixel? it is equivalent of: pcmpeqd mm2,mm0
|
|||
22 Nov 2005, 08:17 |
|
Vasilev Vjacheslav 22 Nov 2005, 09:28
i speak with myself i created mask of pixel with this code, but i don't know how to change color :\
Code: and eax,0x80808080 mov ecx,eax mov ebx,eax shr ebx,7 sub eax,ebx or eax,ecx |
|||
22 Nov 2005, 09:28 |
|
vid 22 Nov 2005, 09:43
try to be more specific...
what is input format (monochrome color), and what is output format (coloured pixel)? |
|||
22 Nov 2005, 09:43 |
|
Vasilev Vjacheslav 22 Nov 2005, 12:34
yes, you are right, as i said monochrome background color is black, foreground color is white, background color (black) i want to replace with output backimage (it's done) and foreground color (white) i want to color with my color (not done, i don't know how)
_________________ [not enough memory] |
||||||||||||||||||||||||||||
22 Nov 2005, 12:34 |
|
Vasilev Vjacheslav 24 Nov 2005, 09:36
this code i have now (see picture #3), how to change the color? please help
Code: mov edi,[hBits1] ; background picture mov esi,[hBits2] ; font picture mov edx,[edi] mov eax,[esi] or eax,eax jz skip ; create mask of font picture pixel and eax,0x80808080 mov ecx,eax mov ebx,eax shr ebx,7 sub eax,ebx or eax,ecx ; create pixel from mask (eax - mask) or edx,eax skip: ; store result mov [edi],edx |
|||
24 Nov 2005, 09:36 |
|
revolution 24 Nov 2005, 10:03
IF:
eax=mask for white ebx=background pixels (i assume 4 pixels per dword) ecx=desired forground pixels THEN: Code: mov edx,ebx and edx,eax not eax ;invert the mask mov edi,ecx and edi,eax not eax ;restore mask for next iteration or edx,edi ;<-- the new pixel data is here now |
|||
24 Nov 2005, 10:03 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.