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

DelphiͼÏñ´¦ÀíÖÐScanLineµÄʹÓÃ

Ò»°ãÎÒÃÇÔÚDelphiÖнøÐÐͼÏñ´¦Àíʱ²ÉÓÃPixelsÏñËص㸳ֵµÄ·½·¨£¬Delphi´úÂëÈçÏ£º
var
x,y:Integer;
cColor:TColor;
begin
  for y:=0 to Image1.Height-1 do
    for x:=0 to Image1.Width-1 do
      cColor:=Image1.Canvas.Pixels[i,j];
end;
µ«ÊÇÕâÖÖ·½·¨Óиöȱµã£¬´¦ÀíËٶȺÜÂý£¬Ð¡Í¼Ïñ»¹¿ÉÒÔ£¬¶ÔÓÚ´óµãµÄͼÏñÀ´Ëµ¾ÍÌ«ÂýÁË¡£
DelphiÌṩÁËÒ»ÖÖɨÃèÏßScanLine·½·¨ÊǶÔͼÏñµÄÒ»ÐнøÐÐɨÃ裬»ñÈ¡±¾ÐÐÖи÷ÏñËصÄÄÚ´æµØÖ·¡£ÖÚËùÖÜÖª£¬ÄÚ´æ²Ù×÷¿Ï¶¨»á±È³£¹æµÄÏñËص㸳ֵËٶȿìºÜ¶à£¬ËùÒÔ½«´ó´óÌá¸ßͼÏñµÄ´¦ÀíËٶȡ£
Delphi´úÂëÈçÏ£º
var
P:array[0..100] of PByteArray;//ÏñËØÊý×é       
y:Integer;
begin
  for y:=0 to Bmp.Height-1 do
  begin
    P[y]:=Bmp.ScanLine[y];//½«Í¼Æ¬ËùÓÐÏñËØÖµ´æÈëP
  end;
end;
ÕâÑù¾Í½«Ò»¸öͼÏñµÄËùÓÐÏñËض¼´æÈëÁËPÕâ¸öÊý×é
ÔÚSysUtilsµ¥ÔªÖпÉÒÔ¿´³öPByteArrayʵ¼ÊÉÏÊÇÒ»¸öByteÀàÐ͵ÄÊý×é
ËùÒÔÎÒÃÇÉùÃ÷µÄP:array[0..100] of PByteArray;ʵ¼ÊÉÏ¿ÉÒÔ¿´³ÉÊÇÒ»¸ö¶þάÊý×é
PÊý×é¾ÍÊÇÒ»¸öͼÏñÏñËصĻº³åÇø£¬ËüµÄһάÊÇͼÏñY×ø±ê£¬¶þάÊÇͼÏñµÄX×ø±ê¡£
ÕâÑù£¬Èç¹ûÎÒÃÇÒª¶ÔͼÏñµÄij¸öÏñËظ³Öµ£¬ÀýÈ罫µÚÒ»ÐС¢µÚ¶þÁеÄÏñËظ³ÖµÎª°×É«£¬¿ÉÓÃÏÂÃæµÄDelphi´úÂë
var
P:array[0..100] of PByteArray;//ÏñËØÊý×é
x,y:Integer;
begin
  for y:=0 to Bmp.Height-1 do
  begin
    P[y]:=Bmp.ScanLine[y];//½«Í¼Æ¬ËùÓÐÏñËØÖµ´æÈëP
  end;
  y:=0;//µÚÒ»ÐÐ
  x:=1;//µÚ¶þÁÐ
  P[y][x*3]:=255;//ÏñËصĵÚÒ»×Ö½Ú
  P[y][x*3+1]:=255;//ÏñËصĵڶþ×Ö½Ú
  P[y][x*3+2]:=255;//ÏñËصĵÚÈý×Ö½Ú
end;
ÉÏÃæµÄ´úÂëÖУ¬ÎÒÃÇʹÓõÄͼÏñÊÇ24λɫµÄ(TPixelFormat:=pf24bit)£¬Ò²¾ÍÊÇÒ»ÕÅÕæ²ÊÉ«µÄͼƬ£¬pf24bitµÄͼÏñÖУ¬Ã¿¸öÏñËØÔÚÄÚ´æÖÐÕ¼ÓÃÈý¸ö×Ö½Ú£¬·Ö±ð±íʾRGBÖµµÄ·ÖÁ¿£¬ËùÒÔÎÒÃÇ¿ÉÒÔ¶ÔÈý¸ö×Ö½ÚÖ±½Ó¸³Öµ
ÔÚÆäËüÀàÐ͵ÄͼÏñÖоͲ»Ò»¶¨ÄÜÕâÑù¸³ÖµÁË
TPixelFormat:=pf1bitµÄͼÏñ(µ¥É«Í¼)ÖÐÿÏñËØÓÃ1λÀ´±íʾ£¬ËùÒÔҪʹÓÃλ²Ù×÷À´¸øÏñËظ³Öµ
TPixelFormat:=pf4bitµÄͼÏñÖÐÿÏñËØÓÃ4λÀ´±íʾ£¬Ò²ÒªÊ¹ÓÃλ²Ù×÷À´¸øÏñËظ³Öµ
TPixelFormat:=pf8bitµÄͼÏñÖÐÿÏñËØÓÃ8λÀ´±íʾ£¬¿ÉÒÔʹÓÃByteÀàÐ͵ÄÖµ¸øÏñËظ³Öµ£¬²»¹ýÕâÀàͼÏñ±È½


Ïà¹ØÎĵµ£º

Delphi²Ù×÷×¢²á±íµÄÒ»°ã²½Öè

Delphi²Ù×÷×¢²á±í²½ÖèÈçÏ£º
-------------------------------------
1£©ÔÚUsesÖÐÌí¼ÓRegistryµ¥Ôª£»
2£©ÉùÃ÷TRegistry¶ÔÏó£»
3£©´´½¨TRegistry¶ÔÏó£»
4£©Ö¸¶¨¸ù¼ü£»
----------------try------------------
5£©´ò¿ªÐèÒª²Ù×÷µÄÖ÷¼ü£»
6£©¶Áд²Ù×÷£»
7£©±£´æ²¢¹Ø±ÕÖ÷¼ü£»
--------------finally----------------
......

ÓÃdelphiÖÆ×÷OCX¿âÎļþ£¨Ò»£©

¿ª·¢²½Ö裺
1¡¢´´½¨ActiveX Library¹¤³Ì¡£
2¡¢´´½¨COM Object¡£
3¡¢´´½¨Type Library£¬²¢´´½¨ÏàÓ¦½Ó¿Ú¡£
4¡¢´´½¨½Ó¿Ú¶ÔÓ¦µÄº¯ÊýºÍʵÏÖ¡£
¾ßÌåÈçÏ£º
1¡¢´´½¨ActiveX Library¹¤³Ì¡£
new|other|activeX|activeX library
Delphi»á×Ô¶¯Éú³É¿ò¼Ü´úÂ룬ֱ½Ó±àÒëµÄ»°¾Í¿ÉÒԵõ½Ò»¸ödllÎļþÁË£»
Èç¹ûÏë±àÒë³öÀ´µÄÊÇocxÎÄ ......

ÓÃdelphiÖÆ×÷OCX¿âÎļþ£¨¶þ£©

¿ª·¢²½Ö裺
1¡¢´´½¨ActiveX Library¹¤³Ì¡£
2¡¢´´½¨COM Object¡£
3¡¢´´½¨Type Library£¬²¢´´½¨ÏàÓ¦½Ó¿Ú¡£
4¡¢´´½¨½Ó¿Ú¶ÔÓ¦µÄº¯ÊýºÍʵÏÖ¡£
¾ßÌåÈçÏ£º
1¡¢´´½¨COM Object¡£
new|other|activeX|com object
ÔÚClass Name(±¾ÀýÀïÀàÃûÀïÌîObject£¬¿É°´×Ô¼ºÐèÒªÌîд) ÌîдÀàÃû.(Instancing:ʵÀý´´½¨·½Ê½,Threading Model:Ï ......

DelphiµÄWeb Services¼¼Êõ¿ª·¢¶ÌÐÅÓ¦ÓóÌÐò

Ò»ÌáÆð»ùÓÚWeb Services¼¼ÊõµÄÓ¦ÓóÌÐò¿ª·¢£¬Ò»°ãÈËÊ×ÏÈÏëµ½µÄ¿ª·¢¹¤¾ßÊÇVs.net£¬Æäʵ×÷Ϊ¿ìËÙÓ¦ÓóÌÐò¿ª·¢¹¤¾ß(RAD)µÄÀÏ´ó£¬Delphi´Ó6.0¾Í¿ªÊ¼Ö§³ÖWeb ServicesµÄ¿ª·¢ºÍÓ¦ÓÃÁË£¬±¾ÎÄͨ¹ýʹÓÃDelphi 7.0µ÷ÓÃÐÂÀË·¢ËͶÌÐŵÄWeb Service½øÐжÌÐÅÓ¦ÓóÌÐò¿ª·¢ÕâһʵÀýÏêϸµÄ½éÉÜÔÚDelphiÖÐÈçºÎ¿ª·¢»ùÓÚWeb ServicesµÄÓ¦ÓÃϵͳ¡ ......

Delphi µÄÔËËã·ûÁбí


·ÖÀà
ÔËËã·û
²Ù×÷
²Ù×÷Êý
½á¹ûÀàÐÍ
·¶Àý
ËãÊõÔËËã·û
+
¼Ó
ÕûÊý£¬ÊµÊý
ÕûÊý£¬ÊµÊý
X + Y
-
¼õ
ÕûÊý£¬ÊµÊý
ÕûÊý£¬ÊµÊý
Result - 1
*
³Ë
ÕûÊý£¬ÊµÊý
ÕûÊý£¬ÊµÊý
P * InterestRate
/
ʵÊý³ý
ÕûÊý£¬ÊµÊý
ʵÊý
X / 2
div
ÕûÊý³ý
ÕûÊý
ÕûÊý
Total div UnitSize
mod
È¡Ä£
ÕûÊý
ÕûÊý
Y mod 6 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ