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: [request..?] Special Cover Art viewer (Read 582 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[request..?] Special Cover Art viewer

I'm looking for a cover art viewer that doesn't scale images if they are smaller than the box viewing them, similar to Audacious.
For now I put transparent padding around images to fit the size of the default viewer, but I would rather not do that

Re: [request..?] Special Cover Art viewer

Reply #1
Install this component:

https://jscript-panel.github.io/docs/

Add panel to a layout and then choose the included Album Art sample from the Samples button in the Configuration Window.

By default, it does not do what you want but you can override it with a bit of javascript.

On line 53, replace this...

Code: [Select]
function on_paint(gr) {
panel.paint(gr);
albumart.paint(gr);
}

with...

Code: [Select]
function on_paint(gr) {
panel.paint(gr);
if (!albumart.img) return;

if (albumart.img.Width < panel.w && albumart.img.Height < panel.h) {
var x = (panel.w - albumart.img.Width) / 2;
var y = (panel.h - albumart.img.Height) / 2;
_drawImage(gr, albumart.img, x, y, albumart.img.Width, albumart.img.Height, image.centre);
} else {
_drawImage(gr, albumart.img, 0, 0, panel.w, panel.h, image.centre);
}
}

Re: [request..?] Special Cover Art viewer

Reply #2
And if you don't want to fiddle with Javascript, Spider Monkey Panel has a Thumbs.js in the complete folder.
Can Crop (two methods), Stretch, or Center. Thumbs can be turned off leaving just the art... also supports a custom folder (+titleformat support) with cycle option if more than one image contained, sort order alphabetic or by modified date-time, Last.FM artist art, and some other (useful?) options
Installation fairly similar, but instead of a button, right-click the panel you dropped it in, choose configure and select the script from the dropdown in top.

 

Re: [request..?] Special Cover Art viewer

Reply #3
And if you don't want to fiddle with Javascript, Spider Monkey Panel has a Thumbs.js in the complete folder.

Having a border around the edge isn't remotely close to what was asked for. Read the first post again and look at the attached image in full size.

Also, I wrote Thumbs and most other scripts bundled with SMP. It should go without saying they're all included with JSP3. JSP3 also has the added bonus of being optimised for fb2k 2+/64bit/dark mode/many new features/bug fixes/etc.

edit: SMP is important for the scripts NOT included with it. Those writing their own may prefer the modern javascript it supports and 3rd party scripts from WilB/regor/etc.