![]() |
Video Seitenverhältnisse - Bildberechnung - AspectRatio
hallo zusammen
Ich hoffe ihr habt mehr ahnung von videos wie ich. :gruebel: ich setze
Delphi-Quellcode:
und will nun selbst die größe und Position von "VideoWindow1" berechnen.
VideoWindow1.AspectRatio := rmStretched;
das heist vergrößern auf dem Bildschirm 16:9 TV aber die seitenverhältnisse des Videos sollen dann stimmen. aber so einfach wie ich mir das dachte ist das wol garnicht. :( Ich habe viel hin und her probiert. zur zeit sieht das so aus aber das Bild passt nicht wirklich; :coder:
Delphi-Quellcode:
kann mir da vieleicht einer weiterhelfen denn ich glaube so wird das nicht wirklich gehen ????
procedure TForm4.TV_16to9;
VAR VOutT,VOutL,VOutH,VOutW,P,PW,PH:Integer; VH,VW:Integer; begin AspectRatioStr:='16:9'; //ist nur Information zur OSD Infopanel DisplayModus := dmNormal; //ist nur Information zur OSD Infopanel VW:=VideoWindow1.VideoImageWidth; VH:=VideoWindow1.VideoImageHeight; PW:=Form4.Width-VW; P:=PW div 12; PH:=P * 9; VOutW:=Form4.Width; VOutH:=VH+PH; VOutL:=(Form4.Width-VOutW) div 2; VOutT:=(Form4.Height-VOutH) div 2; VideoWindow1.Top:=VOutT; VideoWindow1.Left:=VOutL; VideoWindow1.Height:=VOutH; VideoWindow1.Width:=VOutW; VideoWindow1.AspectRatio := rmStretched; end; procedure TForm4.TV_16to9Crop; VAR VOutT,VOutL,VOutH,VOutW,P,PW,PH:Integer; VH,VW:Integer; begin AspectRatioStr:='16:9'; //ist nur Information zur OSD Infopanel DisplayModus := dmCrop; //ist nur Information zur OSD Infopanel VW:=VideoWindow1.VideoImageWidth; VH:=VideoWindow1.VideoImageHeight; PH:=Form4.Height-VH; P:=PH div 9; PW:=P * 12; VOutH:=Form4.Height; VOutW:=VW+PW; VOutL:=(Form4.Width-VOutW) div 2; VOutT:=(Form4.Height-VOutH) div 2; VideoWindow1.Top:=VOutT; VideoWindow1.Left:=VOutL; VideoWindow1.Height:=VOutH; VideoWindow1.Width:=VOutW; VideoWindow1.AspectRatio := rmStretched; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:33 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz