Author Topic: Resolution  (Read 4301 times)

deus-ex

  • Posts: 264
Re: Resolution
« Reply #25 on: 18 Aug '18 - 19:33 »
Correct, the new XMP skin files are just renamed regular ZIP archives, no special magic or additional treatment required. Make sure you have Xmp-ZIP.dll installed along with XMPlay.exe, either in a subir (e.g. \Plugins) or in the same folder.

Rah'Dick

  • XMPlay Support
  • Posts: 962
Re: Resolution
« Reply #26 on: 18 Aug '18 - 20:55 »
Ah, thanks. I noticed that when packing everything, I accidentally put the files in a sub-folder inside the ZIP. Works now. :-)
And I noticed that WINE likes XMPlay a bit more than a few years ago, although there still are some severe bugs - but at least I can test the skin conversions without having to run a VM with Windows somewhere ;)

My script is using ImageMagick for PHP but unfortunately I don't have that extension installed on my website (shared hosting). So currently I can only do some offline conversions until I find a place to upload the resizer. Any requests?

garson

  • Posts: 144
Re: Resolution
« Reply #27 on: 18 Aug '18 - 22:50 »
Great thread! Couple of years ago I was asking about possibility for skins that would work on full HD screen.
Great that we have progress on that.

Rah'Dick,
I have skin that I would like to be scaled 1.5 or 2 times. Would you be able to do that?

Rah'Dick

  • XMPlay Support
  • Posts: 962
Re: Resolution
« Reply #28 on: 19 Aug '18 - 00:26 »
@garson: Sure, which one?

I also made some progress on my script - it can now be used like a command line app, with parameters and everything, and can automatically unpack and repack .xmpskin files.
Quote
$ php xmplay-skin-scaler.php -i "Plastic.xmpskin" -s 1.5 -f triangle
XMPlay Skin Scaler 0.1 (2018-08-19) by Thomas Radeke
Input: 'Plastic.xmpskin'
Unpacking...
Creating target directory 'Plastic [scaled 1.5]'...
Copying misc files to 'Plastic [scaled 1.5]'...
Modifying 'Plastic [scaled 1.5]/skinconfig.txt'...
Scaling and converting skin images using 'triangle' filter...
Creating 'Plastic [scaled 1.5].xmpskin'...
Done. Share and enjoy!

[Edit] If anyone wants to try for themselves, I've set up a github repo:
https://github.com/ThomasRadeke/xmplay-skin-scaler
« Last Edit: 19 Aug '18 - 01:34 by Rah'Dick »

garson

  • Posts: 144
Re: Resolution
« Reply #29 on: 19 Aug '18 - 04:02 »
Hey Rah'Dick.
Skin is not available on support site, I think someone on this forum made it. It is called Delta Black.
I have attached it.
Thanks. :)

Rah'Dick

  • XMPlay Support
  • Posts: 962
Re: Resolution
« Reply #30 on: 19 Aug '18 - 06:05 »
There you go. Nice skin, btw!

I included the 2x version both without (point) and with smoothing (triangle). In case you're wondering, these are the filter algorithm names from ImageMagick.

@ Ian: The forum software just complained that I can't attach .xmpskin files. Just so you know. ;)

deus-ex

  • Posts: 264
Re: Resolution
« Reply #31 on: 19 Aug '18 - 09:53 »
The forum software just complained that I can't attach .xmpskin files.
The attach function hints the user about the allowed file types. Currently only these are accepted: jpg, gif, png, zip, 7z

@Ian:

I think it's unnecessarily inconvenient to restrict the file extensions at all. For example recently I meant to attach a short soundclip to illustrate a replay issue I was about to report. Not only had I to reencode the file from FLAC to MP3 due to size limit constraints of max. 1000 KB per post, which is really, really small these days. Also I had to add the file extension .ZIP to the MP3-file before I would be allowed to attach it. These unnecessarily strict upload restrictions makes handling of such disguised files an annoyance both for the uploader and the downloader(s). I'd be great if you would review and loose up those limitations accordingly.
« Last Edit: 19 Aug '18 - 19:25 by deus-ex »

Rah'Dick

  • XMPlay Support
  • Posts: 962
Re: Resolution
« Reply #32 on: 19 Aug '18 - 14:54 »
The attach function hints the user about the allowed file types. Currently only these are accepted: jpg, gif, png, zip, 7z
I know! It's just that SMF can be configured to accept other extensions, too. ;) And since xmpskin == zip, this would make sense.
For other extensions, this has to be evaluated on a case-by-case basis because by allowing potentially harmful types (e.g. exe), you're opening yourself up for liabilities.

Looks like we are the only ones currently active here, everybody's away for summer  :D

garson

  • Posts: 144
Re: Resolution
« Reply #33 on: 19 Aug '18 - 15:06 »
There you go. Nice skin, btw!

I included the 2x version both without (point) and with smoothing (triangle). In case you're wondering, these are the filter algorithm names from ImageMagick.

@ Ian: The forum software just complained that I can't attach .xmpskin files. Just so you know. ;)
This is fantastic! Thanks a lot. :)

bauxite69

  • Posts: 52
Re: Resolution
« Reply #34 on: 19 Aug '18 - 15:59 »
Looks like we are the only ones currently active here, everybody's away for summer  :D

No you're not !

We just waiting to see the final state of this tool

Thanks !!!  :)

Rah'Dick

  • XMPlay Support
  • Posts: 962
Re: Resolution
« Reply #35 on: 22 Aug '18 - 02:41 »
I'm still looking for a place to host the script, sorry. In the meantime, I added an option to run batch conversions ("*.xmpskin"). Again, if anyone needs something, I can do the conversions offline. Or you can just go to my GitHub repo, grab the source code and try for yourself!
https://github.com/ThomasRadeke/xmplay-skin-scaler

Ian, do you think it would be possible to install the script on the Support Site? I'd make a web UI in that case...

Ian @ un4seen

  • Administrator
  • Posts: 21130
Re: Resolution
« Reply #36 on: 22 Aug '18 - 13:30 »
I think it would be possible to host the script on the support site. If you can add a basic test UI to it, I will check that. The final version would probably also need some rate limiting to prevent abuse.

In the meantime, here is an XMPlay update with a 2x size option for testing:

   www.un4seen.com/stuff/xmplay.exe

It adds a "Big" option to the "Appearance" options page. Please report any problems.

Rah'Dick

  • XMPlay Support
  • Posts: 962
Re: Resolution
« Reply #37 on: 22 Aug '18 - 14:16 »
Thank you, that's amazing! :D Works just fine on my work PC, but the 4K screen is at home. Will edit this post when I had time to test.
My humble opinion on the "Big" checkbox: since it's an option affecting the skin, maybe you could fit it underneath "Open Panels" and call it "Double size" to make it less ambiguous?

saga

  • Posts: 2262
Re: Resolution
« Reply #38 on: 22 Aug '18 - 15:45 »
Just an idea: At least on first start, when there are no settings yet, XMPlay should probably check the DPI settings and if they're >= 192, apply this flag automatically.

Ian @ un4seen

  • Administrator
  • Posts: 21130
Re: Resolution
« Reply #39 on: 22 Aug '18 - 18:06 »
My humble opinion on the "Big" checkbox: since it's an option affecting the skin, maybe you could fit it underneath "Open Panels" and call it "Double size" to make it less ambiguous?

Yeah, if all is well, the option will probably be moved up to the "Skin" area. Just quickly added the option down there for testing :)

Of the skins I've tried so far, the B-Red skin is the only one I've noticed with problems (playlist font becomes too big).

sveakul

  • Posts: 54
Re: Resolution
« Reply #40 on: 23 Aug '18 - 00:46 »
Ian:  thanks for the 2X option built-in to 3.8.3.10, this has impressive results on most of my skins!  I was wondering if you are using "interpolation on bitmap scaling"?  I'm a novice (know-nothing?) on image scaling, but I notice in another player that allows double-sizing of skins not originally created for sizing that when that option is checked and a skin made 2X, rounded corners and such are rendered much better than with the option off.  I noticed that with the new "Big" option on XMPlay, the reproduction of curves circles etc on skins can be a bit rough (expected though).  By and large however this is a fine performing and much-needed new feature!

Rah'Dick:  please do go ahead with establishing a base for your script to be run on the support site, even with the new "Big" feature it would be great for scaling to other increments (1.5X, 3X, etc.) so users can find their perfect fit!  Thanks for your efforts!

Ian @ un4seen

  • Administrator
  • Posts: 21130
Re: Resolution
« Reply #41 on: 23 Aug '18 - 12:50 »
Ian:  thanks for the 2X option built-in to 3.8.3.10, this has impressive results on most of my skins!  I was wondering if you are using "interpolation on bitmap scaling"?  I'm a novice (know-nothing?) on image scaling, but I notice in another player that allows double-sizing of skins not originally created for sizing that when that option is checked and a skin made 2X, rounded corners and such are rendered much better than with the option off.  I noticed that with the new "Big" option on XMPlay, the reproduction of curves circles etc on skins can be a bit rough (expected though).  By and large however this is a fine performing and much-needed new feature!

It currently simply doubles the dimensions of each pixel with no interpolation/filtering. The issue with filtering is when a colour is used to indicate transparent areas (which most skins do), and that colour ends up blended into the edges. I may look into automatically adding an alpha channel in those cases, to prevent that problem.

Rah'Dick

  • XMPlay Support
  • Posts: 962
Re: Resolution
« Reply #42 on: 24 Aug '18 - 20:59 »
[...] The issue with filtering is when a colour is used to indicate transparent areas (which most skins do), and that colour ends up blended into the edges. I may look into automatically adding an alpha channel in those cases, to prevent that problem.

That's what my script is doing. I'm still looking for a way to do "alpha thresholding" via ImageMagick, then recoloring the transparent areas with color_seethru. GIMP can do that, but I want an automated solution.

sveakul

  • Posts: 54
Re: Resolution
« Reply #43 on: 24 Aug '18 - 22:15 »
Thanks to both of you for working on this, best enhancement to XMPlay for a long time!

piovrauz

  • Posts: 970
Re: Resolution
« Reply #44 on: 25 Aug '18 - 07:21 »
There's still the issue of fonts not being scaled x2 for skins like the WAModern ones, where the timer even changes dependg on the variant of the skin.
The text in the info string is small  and unreadable too, for example MMD3.


Rah'Dick

  • XMPlay Support
  • Posts: 962
Re: Resolution
« Reply #45 on: 25 Aug '18 - 19:23 »
There's still the issue of fonts not being scaled x2 for skins like the WAModern ones, where the timer even changes dependg on the variant of the skin.
The text in the info string is small  and unreadable too, for example MMD3.
I see what you mean. Looks like these skins use FON fonts, which are bitmap fonts. When scaling skins, my tool leaves fonts as they are, but requests a larger display size in skinconfig.txt, but bitmap fonts must actually have glyphs for that size. I had success scaling the fonts with FontForge. I'll see if I find a way to integrate that into my scaler somehow.

Dotpitch

  • Posts: 2878
Re: Resolution
« Reply #46 on: 25 Aug '18 - 19:56 »
It adds a "Big" option to the "Appearance" options page. Please report any problems.
Cool! ;D

ImAbar (Userbar Pip) is having some problems on the Extended Playlist. Otherwise, this works impressively well.

Keltic Danor

  • XMPlay Support
  • Posts: 753
Re: Resolution
« Reply #47 on: 26 Aug '18 - 05:25 »
There's still the issue of fonts not being scaled x2 for skins like the WAModern ones, where the timer even changes dependg on the variant of the skin.
The text in the info string is small  and unreadable too, for example MMD3.
I see what you mean. Looks like these skins use FON fonts, which are bitmap fonts. When scaling skins, my tool leaves fonts as they are, but requests a larger display size in skinconfig.txt, but bitmap fonts must actually have glyphs for that size. I had success scaling the fonts with FontForge. I'll see if I find a way to integrate that into my scaler somehow.

There arn't really that many, it's probably much easier to just tweak those manually. I do have 2x versions of them locally I've been playing with but I imagine if you want the x1.5 or so that complicates things quite a bit.

Rah'Dick

  • XMPlay Support
  • Posts: 962
Re: Resolution
« Reply #48 on: 27 Aug '18 - 13:36 »
[...]
There arn't really that many, it's probably much easier to just tweak those manually. I do have 2x versions of them locally I've been playing with but I imagine if you want the x1.5 or so that complicates things quite a bit.

I thought about that, too. But you never know whether some new skin might come around that's using FONs.
I've been thinking to try and convert FONs to TTF somehow. It might be possible with a combination of FontForge scripts and autotrace. This will certainly make scaling easier. Sure, pixel fonts will look weird when scaled by non-integer values, but at least they will scale to any size.

By the way, FONs can contain multiple bitmap strikes (sizes) in the same file and FontForge can generate them (probably via script, too). We could just take every FON from any skin and give them an additional double-size strike, so that old skins will work with the "Big" option built into XMPlay.

Rah'Dick

  • XMPlay Support
  • Posts: 962
Re: Resolution
« Reply #49 on: 1 Sep '18 - 05:21 »
Hello again!

I worked a bit more on my scaler, it now has a web UI (see attachment).
Code's over at GitHub: https://github.com/ThomasRadeke/xmplay-skin-scaler

So, if anyone wants to host it, you're welcome. I'd do it myself, but my shared host doesn't have the neccessary PHP extensions.