Thema: Delphi RLINK32: Out of Memory!

Einzelnen Beitrag anzeigen

Johannes013

Registriert seit: 2. Jun 2009
179 Beiträge
 
Delphi 5 Standard
 
#3

Re: RLINK32: Out of Memory!

  Alt 26. Jun 2009, 10:27
ja, nur eigene unit...:

Delphi-Quellcode:
unit Jojo;

interface

function LastPos(const SubStr, S: string): Integer;
{procedure Tone(Bit: TBitmap; r,g,b: Integer);}

implementation

function LastPos(const SubStr, S: string): Integer; // Letztes Vorkommen-------
var
   i:Integer;
   j:Integer;
begin
   Result:=0; // noch nicht gefunden
   i:=Length(S);
   j:=Length(SubStr);
   while (Result=0) and (i>=1) do
      begin
         if S[i]=SubStr[j] then // passt das Zeichen?
            begin
               Dec(j); // nächstes Zeichen untersuchen
            end
         else
            begin
               j:=Length(SubStr); // wieder mit letztem SubStr-Zeichen anfangen
            end;
         if j=0 then
            begin
               Result:=i; // gefunden
            end;
         Dec(i); // nächstes Zeichen
      end;
end;

// Tönung ------------------------------------------------------------------------
{procedure Tone(Bit: TBitmap; r,g,b: Integer);
type
  PixArray = array [1..3] of Byte;
var
  p: ^PixArray;
  h,w: Integer;
begin
  for h:=0 to Bit.Height-1 do
  begin
    p:= Bit.ScanLine[h];
    for w:=0 to Bit.Width-1 do
    begin
      if (round(p^[1] * ( 1 + b/100))<0) then p^[1]:=0 else
        if (round(p^[1] * ( 1 + b/100))>255) then p^[1]:=255
        else p^[1]:= round(p^[1] * ( 1 + b/100));
      if (round(p^[2] * ( 1 + g/100))<0) then p^[2]:=0 else
        if (round(p^[2] * ( 1 + g/100))>255) then p^[2]:=255
        else p^[2]:= round(p^[2] * ( 1 + g/100));
      if (round(p^[3] * ( 1 + r/100))<0) then p^[3]:=0 else
        if (round(p^[3] * ( 1 + r/100))>255) then p^[3]:=255
        else p^[3]:= round(p^[3] * ( 1 + r/100));
      Inc(p);
    end;
  end;
end;}


end.
???
Johannes
Der folgende Satz ist richtig.
Der vorherige Satz ist falsch.
  Mit Zitat antworten Zitat