Einzelnen Beitrag anzeigen

loirad

Registriert seit: 25. Nov 2009
135 Beiträge
 
Delphi 6 Professional
 
#7

AW: Wie kann ich die angezeigte Größe des Images ermitteln?

  Alt 4. Okt 2012, 15:59
Habe es jetzt so gelöst:
Delphi-Quellcode:
 
if (Bild1.Picture.Height<>0) and (Bild2.Picture.Height<>0) then
  begin
   if Bild1.Picture.Height<Bild1.Picture.Width then
    begin
     B1w:=Bild1.Width;
     B1h:=round(((Bild1.Picture.Height)/(Bild1.Picture.Width))*Bild1.Width);
    end
    else
     begin
      B1w:=((Bild1.Picture.Height) div (Bild1.Picture.Width))*Bild1.Width;
      B1h:=Bild1.Width;
     end;
Vielen Dank für eure Hilfe!

Schöne Rest-Woche noch!
loirad
Wer Fehler findet darf sie behalten!
  Mit Zitat antworten Zitat