| 30 |
|
private |
| 31 |
|
OniImage_Old: TOniImage; |
| 32 |
|
OniImage_New: TOniImage; |
| 33 |
+ |
old_size: Integer; |
| 34 |
|
fileid: Integer; |
| 35 |
|
public |
| 36 |
|
end; |
| 58 |
|
check_transparency.Checked := (depthbyte and $04) > 0; |
| 59 |
|
|
| 60 |
|
OniImage_Old.LoadFromTXMP(fileid); |
| 61 |
+ |
old_size := OniImage_Old.GetImageDataSize((fadingbyte and $01) > 0); |
| 62 |
|
Data := OniImage_Old.GetAsBMP; |
| 63 |
|
mem := TMemoryStream.Create; |
| 64 |
|
mem.Write(Data[0], Length(Data)); |
| 93 |
|
|
| 94 |
|
procedure TForm_TxmpReplace.btn_replaceClick(Sender: TObject); |
| 95 |
|
var |
| 96 |
< |
oldsize, newsize: LongWord; |
| 96 |
> |
newsize: LongWord; |
| 97 |
|
old_rawaddr, new_rawaddr: LongWord; |
| 98 |
|
oldfading: Byte; |
| 99 |
|
tempd: Tdata; |
| 122 |
|
Exit; |
| 123 |
|
end; |
| 124 |
|
|
| 123 |
– |
oldsize := OniImage_Old.GetImageDataSize((oldfading and $01) > 0); |
| 124 |
– |
|
| 125 |
|
if check_fading.Checked then |
| 126 |
|
if not OniImage_New.GetMipMappedImage(tempd) then |
| 127 |
|
if MessageBox(Self.Handle, |
| 136 |
|
tempd := OniImage_New.GetAsData; |
| 137 |
|
|
| 138 |
|
newsize := OniImage_New.GetImageDataSize(check_fading.Checked); |
| 139 |
– |
ShowMessage(IntToStr(newsize)); |
| 139 |
|
|
| 140 |
< |
if (newsize > oldsize) and (OniDataConnection.Backend = ODB_Dat) then |
| 140 |
> |
if (newsize > old_size) and (OniDataConnection.Backend = ODB_Dat) then |
| 141 |
|
new_rawaddr := OniDataConnection.AppendRawFile( |
| 142 |
|
OniDataConnection.OSisMac, Length(tempd), tempd) |
| 143 |
|
else |