Help - Search - Members - Calendar
Full Version: album art ON SCPL album headers
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
macca
I'm using columns UI with a single cloumn playlist, and I want to display the album art on the playlist in the album/artist headers like so:

IPB Image

please can somebody explain to me how to do this?

this is my code for the SCPL:

Group display:

CODE
$imageabs2(%_width%,%_height%,,,,,,,C:\program files\foobar2000\background images\Image1.png,nokeepaspect)

$font(,10,bold glow-171-203-220 glowexpand-1,SYSCOL-15)
$alignabs(2,0,$sub(%_width%,4),$div(%_height%,2),left,top)%artist%:
$font(,8,bold,SYSCOL-15)
$alignabs(2,$div(%_height%,2),$sub(%_width%,4),$div(%_height%,2),left,top)%album%


Item display:

CODE
$if(%_selected%,$drawrect(0,0,0,0,brushcolor-SYSCOL-13 pencolor-null))
$if(%_focused%,$drawrect(0,0,0,0,brushcolor-null pencolor-SYSCOL-6))
$if(%_selected%,$textcolor(SYSCOL-9),$textcolor(SYSCOL-8))

$drawrect(0,0,%_width%,1,brushcolor-null pencolor-null)

$padding(4,0)
$align(right,top)%title%
$align(left,top)$textcolor(80-80-80)%list_index%




thanks alot,
mac
macca
I've got the ball rolling by trying to edit my group display code like so:

CODE
$imageabs2(%_width%,%_height%,,,,,,,C:\program files\foobar2000\background
images\Image1.png,nokeepaspect)
$imageabs2((%div(%_width%,5)),%_height%,,,,,,,$replace(%path%,%filename_ext%,folder.jpg),NOKEEPASPECT)

$font(,10,bold glow-171-203-220 glowexpand-1,SYSCOL-15)
$alignabs(2,0,$sub(%_width%,4),$div(%_height%,2),left,top)%artist%:
$font(,8,bold,SYSCOL-15)
$alignabs(2,$div(%_height%,2),$sub(%_width%,4),$div(%_height%,2),left,top)%album%


The second $imageabs2 is supposed to place the album art on top of the first one. I know this code is not correct, because it doesn't work, (you might have guessed I'm not very good at this lark blink.gif ) but let me try and explain what I've tried to do...

- I tried to set the width of the album art to one fifth the width of the playlist (also the width of the first $imageabs) to get the size of it right even when resizing the playlist etc.
- I assumed that the height of the album art would be simply '%_height%', as I want it the same height as the header (like in the image above^^), and this is what I used to define the height of that.
- as for the other options that I've left blank (Cropping corner placement, Cropping dimmensions, and panel placement), well I don't really understand exactly how to use them to be honest wink.gif , but I'm sure someone is going to tell me that they're essential to what I'm trying to do... smile.gif

anyway thanks to anyone who could spend some time to help me biggrin.gif
The Judge
It's $div not %div.

$imageabs2($div(%width,5),etc etc....)

Not sure if that will work but that bit is definitely wrong at least
macca
Thanks!
what a stupid mistake to make lol. wink.gif

anyway you've given me a good start, its being displayed now, and its the right size too, as you can see...

IPB Image

Now all I need to do is to align it to the right hand side of the header, any ideas?

here is the updated code for reference:

CODE
$imageabs2(%_width%,%_height%,,,,,,,C:\program files\foobar2000\background images\Image1.png,nokeepaspect)
$imageabs2($div(%_width%,5),%_height%,,,,,,,$replace(%path%,%filename_ext%,folder.jpg),NOKEEPASPECT)

$font(,10,bold glow-171-203-220 glowexpand-1,SYSCOL-15)
$alignabs(2,0,$sub(%_width%,4),$div(%_height%,2),left,top)%artist%:
$font(,8,bold,SYSCOL-15)
$alignabs(2,$div(%_height%,2),$sub(%_width%,4),$div(%_height%,2),left,top)%album%


Mac

macca
no worries I figured it out now anyway using a bit of initiative! this is my final code for anyone else who wants to do this:

CODE
$imageabs2(%_width%,%_height%,,,,,,,C:\program files\foobar2000\background images\Image1.png,nokeepaspect)
$imageabs2($div(%_width%,5),%_height%,,,,,$sub(%_width%,$div(%_width%,5)),,$replace(%path%,%filename_ext%,folder.jpg),NOKEEPASPECT)

$font(,10,bold glow-171-203-220 glowexpand-1,SYSCOL-15)
$alignabs(2,0,$sub(%_width%,4),$div(%_height%,2),left,top)%artist%:
$font(,8,bold,SYSCOL-15)
$alignabs(2,$div(%_height%,2),$sub(%_width%,4),$div(%_height%,2),left,top)%album%


biggrin.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.