Changeset 118
- Timestamp:
- Mar 23, 2007, 1:58:09 AM (18 years ago)
- Location:
- oup/current/Global
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
oup/current/Global/OniImgClass.pas
r113 r118 20 20 function ResizeImage(oldx, oldy: Integer; img: TByteData): TByteData; 21 21 procedure RevertImage; 22 procedure DecodeImage;23 22 procedure DecompressImage; 24 23 protected … … 38 37 function LoadFromTXMB(ConnectionID, FileID: Integer): Boolean; 39 38 function GetImageDataSize(fading: Boolean): Integer; 39 40 procedure DecodeImageTo32bit; 40 41 41 42 procedure GetAsData(var Target: TStream); overload; … … 132 133 133 134 134 procedure TOniImage.DecodeImage ;135 procedure TOniImage.DecodeImageTo32bit; 135 136 var 136 137 x, y: Integer; … … 371 372 txmpimg := TOniImage.Create; 372 373 txmpimg.LoadFromTXMP(ConnectionID, PSpc.TXMP); 373 txmpimg.DecodeImage ;374 txmpimg.DecodeImageTo32bit; 374 375 // txmpimg.WriteToBMP('C:\file.bmp'); 375 376 txmpimg.GetAs32bit(txmpdata); … … 536 537 images_decoded[i] := TOniImage.Create; 537 538 images_decoded[i].LoadFromTXMP(ConnectionID, link); 538 images_decoded[i].DecodeImage ;539 images_decoded[i].DecodeImageTo32bit; 539 540 images_decoded[i].RevertImage; 540 541 end; … … 604 605 x := Self.FWidth; 605 606 y := Self.FHeight; 606 size := x * y * bppdiv 8;607 size := (x * y * bpp) div 8; 607 608 if fading then 608 609 begin … … 610 611 x := x div 2; 611 612 y := y div 2; 612 size := size + x * y * bppdiv 8;613 size := (size + x * y * bpp) div 8; 613 614 until (x = 1) or (y = 1); 614 615 end; … … 655 656 begin 656 657 if not (DT_Decoded32 in Self.FDataType) then 657 Self.DecodeImage ;658 Self.DecodeImageTo32bit; 658 659 if not Assigned(Target) then 659 660 Target := TMemoryStream.Create; … … 684 685 begin 685 686 if not (DT_Decoded32 in Self.FDataType) then 686 Self.DecodeImage ;687 Self.DecodeImageTo32bit; 687 688 688 689 SetLength(Target, Self.FWidth * Self.FHeight * 3 + 54); -
oup/current/Global/RawList.pas
r113 r118 312 312 storetype: Byte; 313 313 datasize: Integer; 314 begin 314 mipmap: Byte; 315 bpp: Byte; 316 begin 317 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $88, SizeOf(mipmap), @mipmap); 315 318 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $8C, SizeOf(x), @x); 316 319 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $8E, SizeOf(y), @y); … … 318 321 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $9C, 4, @link_pc); 319 322 ConManager.Connection[ConnectionID].LoadDatFilePart(fileid, $A0, 4, @link_mac); 323 324 320 325 case storetype of 321 326 0, 1, 2: 322 datasize := x * y * 2; 327 bpp := 16; 328 // datasize := x * y * 2; 323 329 8: 324 datasize := x * y * 4; 330 bpp := 32; 331 // datasize := x * y * 4; 325 332 9: 326 datasize := x * y div 2; 327 end; 333 bpp := 4; 334 // datasize := x * y div 2; 335 end; 336 337 datasize := (x * y * bpp) div 8; 338 if (mipmap and $01) > 0 then 339 begin 340 repeat 341 x := x div 2; 342 y := y div 2; 343 datasize := (datasize + x * y * bpp) div 8; 344 until (x = 1) or (y = 1); 345 end; 346 328 347 SetLength(Result, 1); 329 348 if ConManager.Connection[ConnectionID].DataOS = DOS_WIN then -
oup/current/Global/TypeDefs.pas
r113 r118 76 76 77 77 TRawDataInfo = record 78 SrcID: Integer;79 SrcOffset: Integer;80 RawAddr: Integer;81 RawSize: Integer;82 LocSep: Boolean;78 SrcID: Integer; 79 SrcOffset: Integer; 80 RawAddr: Integer; 81 RawSize: Integer; 82 LocSep: Boolean; 83 83 end; 84 84 TRawDataList = array of TRawDataInfo;
Note:
See TracChangeset
for help on using the changeset viewer.