Einzelnen Beitrag anzeigen

Benutzerbild von Remote1
Remote1

Registriert seit: 22. Okt 2003
Ort: Dippoldiswalde
252 Beiträge
 
Delphi 6 Personal
 
#2

Re: JPEG vergrößer/verkleiner und anzeigen

  Alt 23. Sep 2004, 21:21
nimm doch einfach ne image komponente (ich nehme die der indys - aber net die image komponente sondern thumbnail da dort auch rotate...)

ich setzte meine pic komponente dann auf eien scrollbox und schon gehts los
alle änderungen können dann auch schön gespeichert werden
vielleicht hilft dir das weiter, musst dirs halt blos anpassen:
Delphi-Quellcode:
procedure TDiashowForm.Zoom(Faktor:integer);
begin
try
 scrollbox.Top:=piccontrole.Height;
 scrollbox.Left:=0;
 scrollbox.Height:=screen.height-piccontrole.Height-5;
 scrollbox.Width:=DiashowForm.Width;
 diapic.Parent:=scrollbox;
 gif.Parent:=scrollbox;
 if (diapic.Picture.Width<diapic.Width) and not (diapic.Stretch)
  then diapic.Width:=diapic.Picture.Width+Faktor
  else diapic.Width:=diapic.Width+Faktor;
 if (diapic.Picture.Height<diapic.Height) and not (diapic.Stretch)
  then diapic.Height:=diapic.Picture.Height+Faktor
  else diapic.Height:=diapic.Height+Faktor;
 if (gif.Image.Width<gif.Width) and not (gif.Stretch)
  then gif.Width:=gif.Image.Width+Faktor
  else gif.Width:=gif.Width+Faktor;
 if (gif.Image.Height<gif.Height) and not (gif.Stretch)
  then gif.Height:=gif.Image.Height+Faktor
  else gif.Height:=gif.Height+Faktor;
 if diapic.Width<scrollbox.Width
  then diapic.Left:=round((scrollbox.Width/2)-(diapic.Width/2))
  else diapic.Left:=0;
 if diapic.Height<scrollbox.Height
  then diapic.Top:=round((scrollbox.Height/2)-(diapic.Height/2))
  else diapic.Top:=0;
 if gif.Width<screen.Width
  then gif.Left:=round((scrollbox.Width/2)-(gif.Width/2))
  else gif.Left:=0;
 if gif.Height<screen.Height
  then gif.Top:=round((scrollbox.Height/2)-(gif.Height/2))
  else gif.Top:=0;
 diapic.Stretch:=true;
 gif.Stretch:=true;
 scrollbox.Visible:=true;
except
 application.MessageBox('Beim Zoom ist ein Fehler aufgetreten.','Achtung',mb_ok+mb_iconerror);
 stopClick(DiashowForm);
end;
end;
denk an die eigenschaften center+strech+proportional
  Mit Zitat antworten Zitat