关于Pbytearray的问题,高分相送,大家一定要帮帮我。。
相关推荐
Gray-Image.zip_PByteArray_Refresh_ Refresh_procedure Grayscale
procedure GrayScale(const Image:TImage) var BytesPerScan: Integer iWidth, iHeight: Integer pScanLine: pByteArray R,G,B: Byte begin try BytesPerScan := Abs(Integer(Image.Picture.Bitmap.ScanLine[1])- Integer(Image.Picture.Bitmap.ScanLine[0])) except raise exception.create(‘Error’) end for iHeight := 0 to Image.Picture.Bitmap.Height - 1 do begin pScanLine := Image.Picture.Bitmap.ScanLine[iHeight] iWidth := 0 while(iWidth <= BytesPerScan - 1) do begin R := pScanLine^[iWidth + 2] G := pScanLine^[iWidth + 1] B := pScanLine^[iWidth + 0] pScanLine^[iWidth + 2] := Byte(Round(0.299 * R + 0.587 * G + 0.114 * B)) pScanLine^[iWidth + 1] := Byte(Round(0.299 * R + 0.587 * G + 0.114 * B)) pScanLine^[iWidth + 0] := Byte(Round(0.299 * R + 0.587 * G + 0.114 * B)) iWidth := iWidth + 3 end end Image.Refresh end
xp下屏幕图象的快速传输
实现局域网监控的视频传输过程详解,带源代码,物超所值
Delphi用两种方法提高对位图象素的访问速度..rar
Delphi用两种方法提高对位图象素的访问速度..rar
位图中用位图ScanLine属性快速灰度图像
Delphi中用位图ScanLine属性快速灰度图像
vc做的点阵屏信息设置上位机软件
array.SetAtGrow(0,0x28);//一帧开始0x24表示一个字节 array.SetAtGrow(1,m_addr);//从机地址一个字节 array.SetAtGrow(2,0xaa);//发送0xaa,一个字节 array.SetAtGrow(3,0x55);//发送0x55,一个字节 array.SetAtGrow(4,m_sendInfo);//发送服务用语等一个字节 array.SetAtGrow(5,m_action1);//起始动作一个字节 time=IntToBcd(m_time1); array.SetAtGrow(6,time);//起始时间一个字节bcd码 array.SetAtGrow(7,m_action2);//停留动作一个字节 time=IntToBcd(m_time2); array.SetAtGrow(8,time);//停留时间一个字节bcd码 array.SetAtGrow(9,m_action3);//结束动作一个字节 time=IntToBcd(m_time3); array.SetAtGrow(10,time);//结束时间一个字节bcd码 array.SetAtGrow(11,m_wordMode1);//字模生成方式一个字节 array.SetAtGrow(12,m_wordMode2);//字模发送方式一个字节 array.SetAtGrow(13,dotStyle);//16点阵 array.SetAtGrow(14,len);//第几行 strcount=GetDotMatrixStrsize(str); array.SetAtGrow(15,strcount);//发送的字符个数 for(i=0;i<str.GetLength();i++) array.SetAtGrow(16+i,str[i]);//发送字符的内码 datalen=pByteArray->GetSize(); array.SetAtGrow(array.GetSize(),datalen);//发送字模数据的字节数的低8位 array.SetAtGrow(array.GetSize(),datalen>>8);//发送字模数据的字节数的高8位 array.SetAtGrow(array.GetSize(),0x10);//发送字模数据长度和字模数据间加0x10 arraylen=array.GetSize(); for(i=0;i<pByteArray->GetSize();i++) array.SetAtGrow(arraylen+i,pByteArray->GetAt(i));//发送的字节数据


