Page 1 of 1

Resizeable image problem in resizable skin

Posted: 03 Oct 2008 23:18
by pjn123
I'm trying to resize the center image for this layout:
Image

Here is my code so far:

Code: Select all

<!--Background--> <Image x="0" y="0" image="normal.topleft" lefttop="lefttop" rightbottom="lefttop" action="move"/> <Image x="143" y="0" image="normal.top" lefttop="lefttop" rightbottom="righttop" action="move" resize="scale"/> <Image x="143" y="0" image="normal.topright" lefttop="righttop" rightbottom="righttop" action="move"/> <Image x="0" y="100" image="normal.left" lefttop="lefttop" rightbottom="leftbottom" action="move" resize="scale"/> <Image x="6" y="100" image="normal.center" lefttop="lefttop" rightbottom="rightbottom" action="move" resize="scale"/> <Image x="311" y="100" image="normal.right" lefttop="righttop" rightbottom="rightbottom" action="resizeE" resize="scale"/> <Image x="0" y="100" image="normal.bottomleft" lefttop="leftbottom" rightbottom="leftbottom" action="move"/> <Image x="157" y="100" image="normal.bottom" lefttop="leftbottom" rightbottom="rightbottom" action="resizeS" resize="scale"/> <Image x="157" y="100" image="normal.bottomright" lefttop="rightbottom" rightbottom="rightbottom" action="resizeSE"/>
Now my problem is that the "normal.center" image stretch width is equal to the width between the topleft & topright and not the left & right.
Is there anyway I can correct this?

I'm used to Winamp Skinning where you can just set x/y and w/h of the image so its very easier ;)

Here is how it looks atm:
Image

The source image CANT be changed since this will brake the whole project of converting Winamp ClassicPro skins to VLC ;)

Thanks for any help!

Re: Resizeable image problem in resizable skin

Posted: 04 Oct 2008 01:03
by pjn123
Ok made some progress with this.

This is how the code should look for image="normal.center":

Code: Select all

<Image x="6" y="100" width="305" height="0" image="normal.center" lefttop="lefttop" rightbottom="rightbottom" resize="mosaic"/>
But VLC dont use the width="305" height="0" params on the image! Tested the above by changing the <image to <video and its works perfectly.

So is this a VLC bug?

Here is a link of a bunch of ClassicPro skins for Winamp:
http://www.antaeus.dk/bin/cpro_skins_rev3.png

The idea is that these will just work in vlc when the project is finished.

Re: Resizeable image problem in resizable skin

Posted: 04 Oct 2008 21:13
by Jean-Baptiste Kempf
This is probably a VLC/skin bug. I'll ask ipkiss to look at it.

Re: Resizeable image problem in resizable skin

Posted: 05 Oct 2008 18:26
by 3breadt
That is not a bug, it's a missing feature.
Skins2 does not support setting width and height attributes to images. By default they always appear in the resolution of the associated bitmap resource.

You could try doing a SubBitmap of the source file with the given width/height. But that would only work for those images that are designed in a way that when resizing they can be repeated.

Re: Resizeable image problem in resizable skin

Posted: 06 Oct 2008 14:12
by pjn123
Thx for the info ;)

Cant change the source image. Hope the width & height param can be implemented in the future. Other objects already resize correct and images can be resized so all the tec is there... just needs to be implemented :D

VLC skinning is really very easy and VLC still opens just as fast so really hope that the skins engine development will get some attention :D