Foobar Component Update
Wednesday, November 01, 2006
Terrestrial has made another great update to his single column playlist module for Foobar2000 v0.9. This latest change adds the following functionality:
+ some tweaks to multiple window / multiple playlists
+ added "Playing" playlist selection
+ $fileexists()
+ added NOKEEPASPECT option for images
+ added wildcard support for images
+ added alignment options for images VALIGN-T (vertical align-TOP), VALIGN-B, HALIGN-L, HALIGN-R
I have highlighted the key improvements that I am now making use of. With these new additions images can be stretched to fit a give frame, for example:
$imageabs2(100,100,,,100,100,5,,$replace(%path%,%filename_ext%,*.jpg),NOKEEPASPECT)
This will display an image (finds any .jpg in the song's directory thanks to the new wildcard function - * is the wildcard) and stretch it to fit a 100x100 frame. Expanding upon this using the new fileexists function:
$if($fileexists($replace(%path%,%filename_ext%,*.jpg)),
$puts(albumMarg,110)
$puts(datax,160)
$imageabs2(100,100,,,100,100,5,,$replace(%path%,%filename_ext%,*.jpg),NOKEEPASPECT)
$imageabs(5,,images/artoverlay-1.png ,)
$drawrect(5,0,100,100,brushcolor-null pencolor-0-0-0)
$drawrect(6,1,98,98,brushcolor-null pencolor-150-150-150)
,
$puts(albumMarg,10)
$puts(datax,60))
This checks that the images is there, if it is it defines a specific margin for later use in positioning of artist, album and trackinfo. It then draws the image, a PNG overlay and some surrounding borders. If the image doesn't exist it defines a different margin so that the song data does not surround an empty space and instead is closer to the left, for example:
+ some tweaks to multiple window / multiple playlists
+ added "Playing" playlist selection
+ $fileexists()
+ added NOKEEPASPECT option for images
+ added wildcard support for images
+ added alignment options for images VALIGN-T (vertical align-TOP), VALIGN-B, HALIGN-L, HALIGN-R
I have highlighted the key improvements that I am now making use of. With these new additions images can be stretched to fit a give frame, for example:
$imageabs2(100,100,,,100,100,5,,$replace(%path%,%filename_ext%,*.jpg),NOKEEPASPECT)
This will display an image (finds any .jpg in the song's directory thanks to the new wildcard function - * is the wildcard) and stretch it to fit a 100x100 frame. Expanding upon this using the new fileexists function:
$if($fileexists($replace(%path%,%filename_ext%,*.jpg)),
$puts(albumMarg,110)
$puts(datax,160)
$imageabs2(100,100,,,100,100,5,,$replace(%path%,%filename_ext%,*.jpg),NOKEEPASPECT)
$imageabs(5,,images/artoverlay-1.png ,)
$drawrect(5,0,100,100,brushcolor-null pencolor-0-0-0)
$drawrect(6,1,98,98,brushcolor-null pencolor-150-150-150)
,
$puts(albumMarg,10)
$puts(datax,60))
This checks that the images is there, if it is it defines a specific margin for later use in positioning of artist, album and trackinfo. It then draws the image, a PNG overlay and some surrounding borders. If the image doesn't exist it defines a different margin so that the song data does not surround an empty space and instead is closer to the left, for example:
Posted by FofR
| Permalink
| Comments (0)
|