{TChunkIDAT implementation}const
{Adam 7 interlacing values}
RowStart: array[0..6] of Integer = (0, 0, 4, 0, 2, 0, 1);
ColumnStart: array[0..6] of Integer = (0, 4, 0, 2, 0, 1, 0);
RowIncrement: array[0..6] of Integer = (8, 8, 8, 4, 4, 2, 2);
ColumnIncrement: array[0..6] of Integer = (8, 8, 4, 4, 2, 2, 1);{Copy interlaced images with 1 byte for R, G, B}
procedure TChunkIDAT.CopyInterlacedRGB8(const Pass: Byte;
Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
var
Col: Integer;
begin
{Get first column and enter in loop}
Col := ColumnStart[Pass];
Dest := pChar(Longint(Dest) + Col * 3);
repeat
{Copy this row}
Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 2)^]; inc(Dest);
Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 1)^]; inc(Dest);
Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) )^]; inc(Dest); {Move to next column}
inc(Src, 3);
inc(Dest, ColumnIncrement[Pass] * 3 - 3);
inc(Col, ColumnIncrement[Pass]);
until Col >= ImageWidth;
end;
以上代码在delphi6可以顺利编译,但是2009编译的时候 Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 2)^]; inc(Dest);报错
[DCC Error] pngimage.pas(2769): E2064 Left side cannot be assigned to
希望有人能指点一下
{Adam 7 interlacing values}
RowStart: array[0..6] of Integer = (0, 0, 4, 0, 2, 0, 1);
ColumnStart: array[0..6] of Integer = (0, 4, 0, 2, 0, 1, 0);
RowIncrement: array[0..6] of Integer = (8, 8, 8, 4, 4, 2, 2);
ColumnIncrement: array[0..6] of Integer = (8, 8, 4, 4, 2, 2, 1);{Copy interlaced images with 1 byte for R, G, B}
procedure TChunkIDAT.CopyInterlacedRGB8(const Pass: Byte;
Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
var
Col: Integer;
begin
{Get first column and enter in loop}
Col := ColumnStart[Pass];
Dest := pChar(Longint(Dest) + Col * 3);
repeat
{Copy this row}
Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 2)^]; inc(Dest);
Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 1)^]; inc(Dest);
Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) )^]; inc(Dest); {Move to next column}
inc(Src, 3);
inc(Dest, ColumnIncrement[Pass] * 3 - 3);
inc(Col, ColumnIncrement[Pass]);
until Col >= ImageWidth;
end;
以上代码在delphi6可以顺利编译,但是2009编译的时候 Byte(Dest^) := fOwner.GammaTable[pByte(Longint(Src) + 2)^]; inc(Dest);报错
[DCC Error] pngimage.pas(2769): E2064 Left side cannot be assigned to
希望有人能指点一下
解决方案 »
- 平方米m2的2怎么上去,我想在dbgrideh表头中设置
- 介绍几本比较经典的delphi编程的书
- 帮我看看这段程序,运行修改密码的时候总提示无法将Null插入Class(表中属性),改列不允许空值,Insert失败。我没用Insert啊
- 请帮我看看这两种定义结构方法不同在哪里?
- 求Delphi控件说明文挡!
- 远程客户端在注册时,注册信息保存在SQL Server 里的表中,在读出注册信息时,有“个别”用户信息会出现乱码现象,请问是怎么会事?急!
- 如何用ADO连接sqlserver7数据库?100分
- access库中的一个表最多支持多大的记录数
- 求‘自适应考试系统’源码。可以要求加到500分,不是废话的都有分。
- 请问在Delphi如何调用windows里自带的ActiveX控件:MSFlexGrid!请大家帮忙..
- 关于颜色表
- 如何在保存数据的时候,依然能够操作界面?
Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
改成:
procedure TChunkIDAT.CopyInterlacedRGB8(const Pass: Byte;
Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: PByte);
Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: pChar);
改成:
procedure TChunkIDAT.CopyInterlacedRGB8(const Pass: Byte;
Src, Dest, Trans{$IFDEF Store16bits}, Extra{$ENDIF}: PByte);
Dest := pChar(Longint(Dest) + Col * 3);
[DCC Error] pngimage.pas(2766): E2010 Incompatible types: 'PByte' and 'PWideChar'
应该是类型不对,我不太熟悉delphi,一直用BCB的。怎么才能赋值呢?