Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: album art ON SCPL album headers (Read 2422 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

album art ON SCPL album headers

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:



please can somebody explain to me how to do this?

this is my code for the SCPL:

Group display:

Code: [Select]
$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: [Select]
$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

album art ON SCPL album headers

Reply #1
I've got the ball rolling by trying to edit my group display code like so:

Code: [Select]
$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  ) 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  , but I'm sure someone is going to tell me that they're essential to what I'm trying to do... 

anyway thanks to anyone who could spend some time to help me

album art ON SCPL album headers

Reply #2
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

album art ON SCPL album headers

Reply #3
Thanks!
what a stupid mistake to make lol. 

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



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: [Select]
$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

 

album art ON SCPL album headers

Reply #4
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: [Select]
$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%