Einzelnen Beitrag anzeigen

KarstenK

Registriert seit: 4. Dez 2007
Ort: Bärenthal
29 Beiträge
 
Delphi 2009 Enterprise
 
#14

AW: IThumbnailCache - Thumbnail ermitteln

  Alt 25. Jan 2013, 14:20
Ja, da war noch ein Fehler (X koordinate wurde doppelt hochgezählt) drin, keine Ahnung wieso der Code bei mir damals ging.
Wobei auch die Korrektur fehlschlug.

Nach setzen auf Pixelformat pf24bit, läuft er heute wieder bei mir.


Delphi-Quellcode:
procedure FlipBitmap(VAr BitmapToFlip: Tbitmap);
var
  i, j: integer;
  P1, p2: Pbytearray;
  bs: byte;
  BytesPerLine: integer;
begin
  BitmapToFlip.PixelFormat := pf24bit;
  BytesPerLine := 3 * BitmapToFlip.Width;

  for I := 0 to BitmapToFlip.Height div 2 - 1 do
    begin
      P1 := BitmapToFlip.ScanLine[i];
      P2 := BitmapToFlip.ScanLine[BitmapToFlip.Height - 1 - i];
      for j := 0 to BytesPerLine - 1 do
        begin
          bs := P1[j];
          P1[j] := P2[j];
          P2[j] := bs;
        end;
    end;
end;
  Mit Zitat antworten Zitat