AIMP Forum

AIMP for PC => Skin Editor, Skin Engine => Вопросы / Questions => Topic started by: tatutl on December 10, 2023, 09:53:30

Title: How to keep an image's aspect ratio?
Post by: tatutl on December 10, 2023, 09:53:30
Suppose a picture is in background,when size is changed,how to zoom in or out with its aspect ratio?
Title: Re: How to keep an image's aspect ratio?
Post by: Artem on December 11, 2023, 08:42:17
Is the picture defined as texture in skin?
Title: Re: How to keep an image's aspect ratio?
Post by: tatutl on December 11, 2023, 09:41:12
Yes
Title: Re: How to keep an image's aspect ratio?
Post by: Artem on December 11, 2023, 15:51:27
Try something like that:
Title: Re: How to keep an image's aspect ratio?
Post by: tatutl on December 11, 2023, 18:25:02
I still like the winamp skins that put pictures on it,but there are not many around now I want to try for myself,I worked it out,it seems script is needed.
because you don't want it to push other things,one way is panel with skin,then create a script on onresize.
Code: [Select]
procedure Execute(Sender, Arguments: TComponent);
var
  Panel: TComponent;
begin
   Panel := FindObject('Panel');
   Panel.Set('PlaceInfo.Size.Width', Panel.Get('PlaceInfo.ActualHeight')*367/338 );
end;
I think it would be useful for some kinds of pictures and with this it is easy for anyone to just put a picture they like in background.