Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

DelphiͼÏñ´¦Àí

    ±¾ÎÄÊÇ»ùÓÚ¡¶GDI+ÔÚDelphi³ÌÐòµÄÓ¦Óà – PhotoshopÉ«Ïà/±¥ºÍ¶È/Ã÷¶È¹¦ÄÜ¡·Ò»ÎĵÄBASMʵÓÃÐÔ¹ý³Ì£¬ÓйØʵÏÖÔ­Àí¿É²Î¼û¡¶GDI+ ÔÚDelphi³ÌÐòµÄÓ¦Óà -- ͼÏñ±¥ºÍ¶Èµ÷Õû¡·ºÍ¡¶GDI+ ÔÚDelphi³ÌÐòµÄÓ¦Óà -- ·ÂPhotoshopµÄÃ÷¶Èµ÷Õû¡·£¬´¿PASʵÏÖ´úÂëºÍ²âÊÔÀý×Ó´úÂë¼û¡¶GDI+ÔÚDelphi³ÌÐòµÄÓ¦Óà – PhotoshopÉ«Ïà/±¥ºÍ¶È/Ã÷¶È¹¦ÄÜ¡·¡£
¹ý³Ì¶¨Ò壺
// µ÷ÕûÉ«Ïà/±¥ºÍ¶È/Ã÷¶È
procedure ImageHSBAdjustment(Data: TImageData; hValue, sValue, bValue: Integer);
ʵÏÖ´úÂ룺
procedure _SetBrightness(Data: TImageData; Value: Integer);
asm
push esi
push edi
push ebx
sar edx, 1 // Value /= 2
movd mm5, edx
punpcklwd mm5, mm5
punpcklwd mm5, mm5
pcmpeqb mm6, mm6
psrlw mm6, 8 // mm4 = 00 FF 00 FF 00 FF 00 FF
pxor mm7, mm7
push edx
call SetDataReg32
pop esi
@yLoop:
push ecx
@xLoop:
mov al, [edi + 3]
movd mm0, [edi]
punpcklbw mm0, mm7
movq mm1, mm0
test esi, esi
js @@1 // if (Value >= 0)
pxor mm0, mm6 // rgb = rgb + (255 - eax) * Value / 128
@@1:
pmullw mm0, mm5 // else
psraw mm0, 7 // rgb = rgb + eax * Value / 128
paddsw mm0, mm1
packuswb mm0, mm7
movd [edi], mm0
mov [edi + 3], al
add edi, 4
loop @xLoop
pop ecx
add edi, ebx
dec edx
jnz @yLoop
emms
pop ebx
pop edi
pop esi
end;
procedure _HueAndSaturation(Data: TImageData; hValue, sValue: Integer);
var
Width, Height, dstOffset: Integer;
S, delta: Integer;
hv, sv: Integer;
asm
push esi
push edi
push ebx
mov hv, edx
mov sv, ecx
call SetDataReg32
mov Width, ecx
mov Height, edx
mov dstOffset, ebx
cld
@yLoop:
push Width
@xLoop:
dec Width
js @@13
movzx ecx, [edi


Ïà¹ØÎĵµ£º

DelphiͼÏñ´¦Àí

    DelphiµÄTCanvasÒÔ¼°ÅÉÉúÀàÌṩÁËÏÔʾTGraphicͼÏñµÄ·½·¨Draw£¬ÆäʵÕâ¸ö·½·¨±¾Éí²¢Ã»ÓÐÏÔʾͼÏñµÄ¹¦ÄÜ£¬Ö»ÊÇ·´¹ýÀ´µ÷ÓÃÁËÒ»ÏÂTGraphicµÄDraw·½·¨¡£TGraphic±¾ÉíÊǸö³éÏóÀ࣬ÆäDraw·½·¨Ò²ÊǸö´¿Ðé·½·¨£¬ËùÒÔTGraphicµÄËùÓÐÅÉÉúÀà±ØÐëÌṩһ¸ö¾ßÌåµÄDraw·½·¨¡£TGraphicµÄÖ÷ÒªÅÉÉúÀàTBitmapÒ²ÓÐÒ»¸öDraw·½· ......

DelphiͼÏñ´¦Àí

    ͼÏñÐýת£¬ÊÇÖ¸°´ÕÕ¸ø¶¨µÄ½Ç¶È£¬¼ÆËã³öͼÏñÿ¸öÏñËØ×ø±êµãÔÚÐÂͼÏñÉϵÄ×ø±êλÖ㬴ӶøʵÏÖÕû¸öͼÏñ×ø±ê±ä»»µÄͼÏñ´¦ÀíÊֶΡ£ÆäÏñËØ×ø±êµÄ±ä»»¹«Ê½Îª£º
    (1)¡¢x' = x * cos(angle) + y * sin(andle)
            y' = ......

Îò͸delphi µÚËÄÕ ½Ó¿Ú

µÚÒ»Õ  DELPHIµÄÔ­×ÓÊÀ½ç
µÚ¶þÕ  DELPHIÓëWIN32ʱ¿Õ
µÚÈýÕ  ¶àÏß³Ì
µÚËÄÕ  ½Ó¿Ú
µÚÎåÕ  °ü
µÚÁùÕ  ʼþÓëÏûÏ¢
µÚÆßÕ  ×éÖ¯ÄãµÄÄ£¿é
µÚ°ËÕ  ̽Ë÷Êý¾Ý¿â
µÚ¾ÅÕ  ¶à²ãÌåϵ½á¹¹
µÚʮՠ ²Ù×÷½çÃæÓë²Ù×÷Âß¼­
µÚʮһÕ  ÃæÏò¶ÔÏóÊý¾Ý¿â»ù´¡
µÚËÄÕÂ&n ......

Îò͸delphi µÚʮһÕ ÃæÏò¶ÔÏóÊý¾Ý¿â»ù´¡

µÚÒ»Õ  DELPHIµÄÔ­×ÓÊÀ½ç
µÚ¶þÕ  DELPHIÓëWIN32ʱ¿Õ
µÚÈýÕ  ¶àÏß³Ì
µÚËÄÕ  ½Ó¿Ú
µÚÎåÕ  °ü
µÚÁùÕ  ʼþÓëÏûÏ¢
µÚÆßÕ  ×éÖ¯ÄãµÄÄ£¿é
µÚ°ËÕ  ̽Ë÷Êý¾Ý¿â
µÚ¾ÅÕ  ¶à²ãÌåϵ½á¹¹
µÚʮՠ ²Ù×÷½çÃæÓë²Ù×÷Âß¼­
µÚʮһÕ  ÃæÏò¶ÔÏóÊý¾Ý¿â»ù´¡
µÚÊ®Ò»Õ ......

DelphiͼÏñ´¦Àí

    ±¾ÎĵÄÏßÐÔÁÁ¶È/¶Ô±È¶Èµ÷Õû·½·¨ÊÇÔÚ¡¶¸Ä½øµÄͼÏñÏßÐÔÁÁ¶Èµ÷Õû·½·¨¡·Ò»ÎÄÖÐÏßÐÔÁÁ¶Èµ÷Õû·½·¨Ó롶DelphiͼÏñ´¦Àí -- PhotoshopͼÏñÁÁ¶È/¶Ô±È¶Èµ÷Õû¡·ÖеĶԱȶȵ÷Õû·½·¨»ù´¡ÉÏÐγɵģ¬ÆäÔ­ÀíºÍÌصã¿É²Î¼ûÕâ2ƪÎÄÕ£º
    ¹ý³Ì¶¨Ò壺
// ÏßÐÔµ÷ÕûÁÁ¶È£¬ValueÁÁ¶ÈÖµ
procedure ImageL ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ