Forum: Object-Pascal / Delphi-Language
by WojTec,
1. Feb 2017
Yeah, what is different way to do this?
Forum: Object-Pascal / Delphi-Language
by WojTec,
1. Feb 2017
Also returns one line not enough :(
Forum: Object-Pascal / Delphi-Language
by WojTec,
1. Feb 2017
Ok, I understand, thank you :)
But another question is, if above code is oke, why eg. Photoshop has different result for this data?
Forum: Object-Pascal / Delphi-Language
by WojTec,
1. Feb 2017
Yes, but in examples both ratios are 16:9, it shouldn't be streched (of course only in case if both has the same aspect ratio, for example HD/FullHD/UltraHD stream on wide screen)?
Forum: Object-Pascal / Delphi-Language
by WojTec,
31. Jan 2017
ScaleX := AControlWidth / AMediaWidth;
ScaleY := AControlHeight / AMediaHeight;
if ScaleX >= ScaleY then
begin
// Result.Width := Round(AMediaWidth * ScaleY);
Result.Width := Round((AMediaWidth / AMediaHeight) * AControlHeight);
Result.Height := AControlHeight;
end
else