Old 24th May 2014, 16:14   #1
garetjax
Candyass
(Major Dude)
 
garetjax's Avatar
 
Join Date: Apr 2001
Location: Benton, AR
Posts: 2,336
Send a message via ICQ to garetjax Send a message via AIM to garetjax Send a message via MSN to garetjax Send a message via Yahoo to garetjax
Question for DrO

DrO,

Is it possible to add the option of loading the classic skin engine with a different file format than 24b BMP? Could, we use PNG....I know out of the box the engine is currently only set to load graphics from the zip with BMP File Formats...but, say you added the PNG file format as optional?


std::string fn = "filename.png";
if(fn.substr(fn.find_last_of(".") + 1) == "png") {
std::cout << "png" << std::endl;
} else {
std::cout << "bmp" << std::endl;
}

^ crazy code...could, be all backwards as I haven't done c++ for about 15 years. In any event adding png support for classic skins albeit trivial; would give plenty options for extending classic skins beyond what they currently provide without adding in the complexity of full on WA5.

1001skins |
That's not a skin, it's some god awful piece of skinner gunk. - Mr. Jones
garetjax is offline   Reply With Quote
Old 24th May 2014, 19:21   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
its actually something I've already been considering to do to allow support for if only as a means to allow fixes to the classic skin support without having to break existing support e.g. the title bar pixel sharing thing or how the duration field is implemented. it'd also make it easier to merge in some of the external changes i've applied to classic skins by allowing them to be done natively without having to hack around things in 2.x skins (which i never liked doing) which would cover winshade aspects on the titlebars as well as the elements to do 3-mode repeat (like modern skins can already do).

though my initial reason for even thinking it was to allow for a way to reduce the size of winamp.exe without affecting functionality (only issue would be it could break some 3rd party plug-ins which expect specific bmp resources to be present in winamp.exe).

it would then be easy to detect just by loading a png or bmp how to handle the elements as needed. though as I'd probably only do it as loading the png files to get a bitmap out of it, I'm not sure it'd be what you're necessarily wanting or expecting from allowing loading of png files i.e. better transparency support on the classic windows like true modern skins allow (though it would be good if any of this even happens to allow for such things to be viable).

either way, I think it has merit but its likely to be lower down the long list of things I need to work on (though having classic style skins able to show long file durations, which a format change would allow to be, is something I would be willing to make potentially breaking changes). though I'm not say that 2.x skins would no longer work - that would be an insane thing to break.
DrO is offline   Reply With Quote
Old 24th May 2014, 19:56   #3
garetjax
Candyass
(Major Dude)
 
garetjax's Avatar
 
Join Date: Apr 2001
Location: Benton, AR
Posts: 2,336
Send a message via ICQ to garetjax Send a message via AIM to garetjax Send a message via MSN to garetjax Send a message via Yahoo to garetjax
I think it is worth the update and would be relatively simple considering. And ya about the expectations... hell, id settle just for alpha blending... but, I am all to well versed in the engine load of bitmap resources. The load would really just be a png loaded bitmap... but, would easily solve many other issues and would give 'updateability' platform wise to the Winamp skin files. IE an easier method to interchange the skin from old to knew format.

It would also be nice to include the option to load bitmap resources to window components... a la Winamp library....etc. Ah, dreaming... though.

Any effort on your part would be a push in the right direction, for which many would unknowingly be benefitting.

Thanks for replying... and giving me something to dream about.

1001skins |
That's not a skin, it's some god awful piece of skinner gunk. - Mr. Jones
garetjax is offline   Reply With Quote
Old 24th May 2014, 20:24   #4
DrO
 
Join Date: Sep 2003
Posts: 27,873
Quote:
Originally Posted by garetjax View Post
It would also be nice to include the option to load bitmap resources to window components... a la Winamp library....etc.
not quite following what you mean by that..?
DrO is offline   Reply With Quote
Old 24th May 2014, 20:35   #5
garetjax
Candyass
(Major Dude)
 
garetjax's Avatar
 
Join Date: Apr 2001
Location: Benton, AR
Posts: 2,336
Send a message via ICQ to garetjax Send a message via AIM to garetjax Send a message via MSN to garetjax Send a message via Yahoo to garetjax
When using the wasabi component for the playlist ... I believe you cannot provide skin gfx...nor sizing params etch... but, that's an issue for v5 not for classic.

1001skins |
That's not a skin, it's some god awful piece of skinner gunk. - Mr. Jones
garetjax is offline   Reply With Quote
Old 24th May 2014, 20:37   #6
DrO
 
Join Date: Sep 2003
Posts: 27,873
so mean support for something like a custom background image on the playlist or am i still not following? as most of the limitations with the windows + wasabi/gen_ff are fundamental to how things are implemented (since all of the library / playlist windows are effectively the classic skin windows slammed into a wasabi container).
DrO is offline   Reply With Quote
Old 24th May 2014, 20:43   #7
garetjax
Candyass
(Major Dude)
 
garetjax's Avatar
 
Join Date: Apr 2001
Location: Benton, AR
Posts: 2,336
Send a message via ICQ to garetjax Send a message via AIM to garetjax Send a message via MSN to garetjax Send a message via Yahoo to garetjax
I believe we are speaking the same language. The limitations of button graphics, backgrounds and etc, I know for example with my wmc skins that I had to build an elaborate script in order for the wasabi windows to do backgrounds and etc, ... the add, select misc load bins off the playlist controls are not skinnable when used on a window comp.

1001skins |
That's not a skin, it's some god awful piece of skinner gunk. - Mr. Jones
garetjax is offline   Reply With Quote
Old 24th May 2014, 20:48   #8
DrO
 
Join Date: Sep 2003
Posts: 27,873
ok, i think i better follow now. that sounds more like how you've tried to do things instead of how it's meant to be done as those parts aren't meant to be accessible in a modern skin and is why Bento, etc instead trigger a Windows menu (which i've always thought was a better option for classic skins as well and would resolve a number of ui quirks when using those options in classic skin mode - i.e. showing what is shown when you right-click the items).
DrO is offline   Reply With Quote
Old 24th May 2014, 20:52   #9
garetjax
Candyass
(Major Dude)
 
garetjax's Avatar
 
Join Date: Apr 2001
Location: Benton, AR
Posts: 2,336
Send a message via ICQ to garetjax Send a message via AIM to garetjax Send a message via MSN to garetjax Send a message via Yahoo to garetjax
Hmm, now that you've said that ....lol. Yeah, probably better option... as you can right click in wmc playlist windows for standard options... though...i was more trying to reproduce classic Winamp skin behavior... and was trying to rid myself of features that actually may be easier. Though, the buttons look basic they are more functional....idk...

My goal of course was/is to recreate classic skin functionality in the modern engine... with a defined set of Maki.... and a few additional features that would minimally give some extended functional and graphical changes. IE backgrounds for playlist, transparencies for text, buttons and animations.

1001skins |
That's not a skin, it's some god awful piece of skinner gunk. - Mr. Jones
garetjax is offline   Reply With Quote
Old 24th May 2014, 21:03   #10
DrO
 
Join Date: Sep 2003
Posts: 27,873
for some areas it's tricky and yes things could be improved (though it's a time vs effort vs return which limits what can be done like things with the buttons in the library which are just basic skinned button controls using the OSes ownerdrawing support (as we use for most other controls).

i should probably have a look at wmc again and get a better idea of what you're trying to do as i never liked modern skins getting all the glory when classic skins could (and should) have had things applied to them as well (though trying not to break support was often a big reason nothing was done - hence the appeal of a png-based classic skin format which could be iterated on without messing with the legacy 2.x support).
DrO is offline   Reply With Quote
Old 24th May 2014, 21:06   #11
garetjax
Candyass
(Major Dude)
 
garetjax's Avatar
 
Join Date: Apr 2001
Location: Benton, AR
Posts: 2,336
Send a message via ICQ to garetjax Send a message via AIM to garetjax Send a message via MSN to garetjax Send a message via Yahoo to garetjax
I agree 90% of what wmc is would be supported with just the engine allowing for png...and I would have little reason to keep trying to build out Wm...which, as others have stated is a modern skin...

If you want to get a better grasp just download wmc ado elite.... at 1001

http://www.1001skins.com/pages/skinb...uthor=GaretJax

1001skins |
That's not a skin, it's some god awful piece of skinner gunk. - Mr. Jones
garetjax is offline   Reply With Quote
Old 24th May 2014, 21:19   #12
DrO
 
Join Date: Sep 2003
Posts: 27,873
i really need to do something so Winamp it'll load the contents of skin zips like that one as unless the skin.xml file is in the root level of the archive (and anything to do with the skin is relative to that), it will fail to be loaded (as with that one it appears to have everything inside of a WMC_ADOElite folder at the root level).
DrO is offline   Reply With Quote
Old 24th May 2014, 21:22   #13
garetjax
Candyass
(Major Dude)
 
garetjax's Avatar
 
Join Date: Apr 2001
Location: Benton, AR
Posts: 2,336
Send a message via ICQ to garetjax Send a message via AIM to garetjax Send a message via MSN to garetjax Send a message via Yahoo to garetjax
always has been a problem...with winzip/WinRAR and etc...when you zip up the contents it will create a folder and place the files within the folder.

Sorry about that...maybe I should fix the zip...lol.

1001skins |
That's not a skin, it's some god awful piece of skinner gunk. - Mr. Jones
garetjax is offline   Reply With Quote
Old 24th May 2014, 21:38   #14
DrO
 
Join Date: Sep 2003
Posts: 27,873
it's an age old thing where no one realises until others try to use the skins (was one of the main reasons for rejecting things on the old site, that and not having skinned all of the windows). it also seems to depend on how you create the archive as doing it from within the folder seems to not add it whereas right-clicking on the folder itself will then include it.

[edit]
looks like i'd part patched it to cope with such cases ages ago. with that file it doesn't work because the filename is WMC_ADOElite_3.5.wal which causes the internal check to look for 'WMC_ADOElite_3.5' which obviously fails as it finds 'WMC_ADOElite' instead. will have to tweak things a bit more to cope with versioned files.
DrO is offline   Reply With Quote
Old 24th May 2014, 21:59   #15
garetjax
Candyass
(Major Dude)
 
garetjax's Avatar
 
Join Date: Apr 2001
Location: Benton, AR
Posts: 2,336
Send a message via ICQ to garetjax Send a message via AIM to garetjax Send a message via MSN to garetjax Send a message via Yahoo to garetjax
makes sense, I was wondering why at times when doing things with WMC ... specially with the newer version (in a file within a folder WMC_ADOELITE...) but, the skin root folder is WMC_ADO_ELITE_4.0.1.wal...there was a delay in render....

~

1001skins |
That's not a skin, it's some god awful piece of skinner gunk. - Mr. Jones
garetjax is offline   Reply With Quote
Old 24th May 2014, 22:13   #16
DrO
 
Join Date: Sep 2003
Posts: 27,873
it looks like it could also explain something else i think i remember you saying about the colours not updating correctly or something like that on skin change (unless i've broken something in the internal builds since it'll not update the playlist editor colours correctly if another skin was loaded before attempting to load the copy i downloaded from your site). at times, i hate the rabbit holes i end up going down when looking into what should be simple things to fix.
DrO is offline   Reply With Quote
Old 24th May 2014, 22:25   #17
garetjax
Candyass
(Major Dude)
 
garetjax's Avatar
 
Join Date: Apr 2001
Location: Benton, AR
Posts: 2,336
Send a message via ICQ to garetjax Send a message via AIM to garetjax Send a message via MSN to garetjax Send a message via Yahoo to garetjax
I have the same problem, when I am at work...yes, there were colour issues on load at times...there wasn't anything I could point at...you asked for examples...and I really couldn't provide them...as screenshots didn't do the issue justice...nor, could we verify it.

There were artifacts left over from one skin to another...near as I can recall.

1001skins |
That's not a skin, it's some god awful piece of skinner gunk. - Mr. Jones
garetjax is offline   Reply With Quote
Old 24th May 2014, 23:15   #18
DrO
 
Join Date: Sep 2003
Posts: 27,873
skin loading failure should now be resolved for the internal builds. with the colouring quirks i was seeing, that is due to the playlist colouring aspects in gen_jumpex which isn't correctly detecting all skin loading failures which causes it to maintain it's cache of colours from the prior skin and not revert to the expected defaults (thankfully that's a simple issue to fix compared to going over the skin loading code as i had to do with the filename version difference).
DrO is offline   Reply With Quote
Old 26th May 2014, 00:22   #19
DrO
 
Join Date: Sep 2003
Posts: 27,873
dunno if this'll be of any interest but was having a look at what the size of a png version of the base classic skin would be like (based on raw file size) compared to the existing bmp version...

it comes out as ~92KB (with all files as optimised 256 colour png) compared to 996KB (copy as included in v5.666 which is mainly 256 colour bmp but some are 24-bit or 32-bit or have a custom palette).


and with a bit of checking of the existing bmp files, i've got them down to 419KB in total compared to the existing 996KB. the main saving was from changing the encoding of the eqmain*.bmp files which went from 676KB combined down to 171KB combined just from changing from a 32-bit to a 256 colour palette (since the classic base skin was originally done with a 256 colour palette).


so that's potentially a 90% raw file size saving going from bmp to png and a 58% raw file size saving just by altering the encoding of the bmp files (so the current internal winamp.exe goes from ~2.13MB to ~1.56MB [~27% file size reduction] with no effect on the skin ).


[edit]
just swapped things over for loading the built-in classic skin from bmp to png and we drop from ~1.56MB to ~1.24MB and i'm not seeing any noticeable issues with the change (other than from one of my plug-ins as i'd expected since it assumes the skin built-in skin bmp resources will be there but obviously they aren't.

and i've also enabled the basic support needed to allow for png files to be loaded from classic skin archives so that's anything deemed to not have a skin.xml present in it. i still need to check it's all ok with a pre-extracted version but i expect it'll be ok if it's working fine with the wsz instances i've been testing with.

so looks like other than a bit more testing, i'll need to find my copy of the skinners atlas, png convert it and then check over what needs to be added and fixed and when i have some 'tinker' time, make the png version specific changes.
DrO is offline   Reply With Quote
Old 26th May 2014, 04:30   #20
garetjax
Candyass
(Major Dude)
 
garetjax's Avatar
 
Join Date: Apr 2001
Location: Benton, AR
Posts: 2,336
Send a message via ICQ to garetjax Send a message via AIM to garetjax Send a message via MSN to garetjax Send a message via Yahoo to garetjax
Of course, we are interested...and it is interesting. Would be good to know that at least the option exists to use png. Whether or not the other 'advanced' uses of png will be used or not; it tends to change the game quite a bit with regards to filesize, color clarity and etc.

Hopefully, the other features that we get with png work with it...though, load through app resources usually results in converting to BMP resource rather than the lossless PNG. (I can imagine resizing a classic Winamp skin beyond double-sizing; when the png format is fully supported with minimal artifacts.

Transparency and alpha masking would be wonderful...but, the former is the main usage; that I can see. up to 48b true color, lossless format for base graphics. mmmm....hmmm;

1001skins |
That's not a skin, it's some god awful piece of skinner gunk. - Mr. Jones
garetjax is offline   Reply With Quote
Old 26th May 2014, 05:11   #21
Koopa
16-Bit Moderator
 
Koopa's Avatar
 
Join Date: Apr 2004
Posts: 4,341
Quote:
Originally Posted by garetjax View Post
(I can imagine resizing a classic Winamp skin beyond double-sizing; when the png format is fully supported with minimal artifacts.
But wouldn't that require source files with a larger resolution?

If the classic skin has a main.bmp with 275x116 and you enable double size, it will upscale the size to 550x232, then you see artefacts.

Or is it possible to upscale png files, so that they don't look as bad like the double sized bmp files do?

Quote:
Transparency and alpha masking would be wonderful
I agree with you.
Koopa is offline   Reply With Quote
Old 26th May 2014, 06:01   #22
garetjax
Candyass
(Major Dude)
 
garetjax's Avatar
 
Join Date: Apr 2001
Location: Benton, AR
Posts: 2,336
Send a message via ICQ to garetjax Send a message via AIM to garetjax Send a message via MSN to garetjax Send a message via Yahoo to garetjax
Png files have better scaling than most other formats which, is likely why it was chosen for modern skins. Lossless and scalable with minimal artifacts.

They by their definition are built to handle scaling.... there is a sister format mng that is like png bit with imaged layers... this format while superior to gif is not widely supported... mostly, because the web browsers never adopted them for wide support across the ecosystem.

In any event great new DrO; one more feather to add to the old cap.

1001skins |
That's not a skin, it's some god awful piece of skinner gunk. - Mr. Jones
garetjax is offline   Reply With Quote
Old 26th May 2014, 06:13   #23
Koopa
16-Bit Moderator
 
Koopa's Avatar
 
Join Date: Apr 2004
Posts: 4,341
Quote:
Originally Posted by garetjax View Post
Png files have better scaling than most other formats which, is likely why it was chosen for modern skins. Lossless and scalable with minimal artifacts.

They by their definition are built to handle scaling.... there is a sister format mng that is like png bit with imaged layers... this format while superior to gif is not widely supported... mostly, because the web browsers never adopted them for wide support across the ecosystem.
Thanks for the explanation.

Yeah, when I scale a modern skin to 200%, it still looks much better than a double sized classic skin (I wrongly thought, that gen_ff does some filtering work when these skins are upscaled, but I didn't knew that the png format was designed/optimized for such stuff)

mng was also meant as a replacement for animated gifs, if I can remember, but the format sadly never became very popular (because of bad browser support etc, like you said).
Koopa is offline   Reply With Quote
Old 26th May 2014, 16:54   #24
DrO
 
Join Date: Sep 2003
Posts: 27,873
with how classic skins are handled, the format of the image doesn't make any difference when it comes to the scaling of things (which is done a bit differently for modern skins which is why they seems to scale better).
DrO is offline   Reply With Quote
Old 31st May 2014, 00:07   #25
garetjax
Candyass
(Major Dude)
 
garetjax's Avatar
 
Join Date: Apr 2001
Location: Benton, AR
Posts: 2,336
Send a message via ICQ to garetjax Send a message via AIM to garetjax Send a message via MSN to garetjax Send a message via Yahoo to garetjax
Bitmap Resources (sigh)...lol.

1001skins |
That's not a skin, it's some god awful piece of skinner gunk. - Mr. Jones
garetjax is offline   Reply With Quote
Old 31st May 2014, 00:11   #26
DrO
 
Join Date: Sep 2003
Posts: 27,873
something like that.
DrO is offline   Reply With Quote
Old 31st May 2014, 00:37   #27
garetjax
Candyass
(Major Dude)
 
garetjax's Avatar
 
Join Date: Apr 2001
Location: Benton, AR
Posts: 2,336
Send a message via ICQ to garetjax Send a message via AIM to garetjax Send a message via MSN to garetjax Send a message via Yahoo to garetjax
ResourceBitmap Stream? BitmapDecoder?

1001skins |
That's not a skin, it's some god awful piece of skinner gunk. - Mr. Jones
garetjax is offline   Reply With Quote
Old 31st May 2014, 01:04   #28
DrO
 
Join Date: Sep 2003
Posts: 27,873
is a good thing i've a vague idea you're referring to C# with ^^.

LoadImage(..) and it's ilk (so basic Win32 functions) is generally what we're using (or an equivalent depending on if it's in a different format) to then get either a HBITMAP or the raw data from the image (depending on what needs to be done) which is what we're then using.

hence why having a PNG or BMP for the classic skin files is not going to make an real difference since we're taking the PNG and converting to a HBITMAP which is then used with the OS methods we're already using (as doing all of that is the easiest way to have PNG loading without breaking the classic engine).
DrO is offline   Reply With Quote
Old 1st June 2014, 18:38   #29
garetjax
Candyass
(Major Dude)
 
garetjax's Avatar
 
Join Date: Apr 2001
Location: Benton, AR
Posts: 2,336
Send a message via ICQ to garetjax Send a message via AIM to garetjax Send a message via MSN to garetjax Send a message via Yahoo to garetjax
yeah, figured as much...in c# you load resources through a ResourceBitmap Reference (Byte Array) then to a MemoryStream. enum the bytearray and display the reference using a control reference.

There is a PNG Reader in C# and it is still loaded through to a Bitmap Renderer...so, you loose transparency and alpha channels. That is if you use the Byte Array; there are other ways of course, that preserve those values...but, definitely are a challenge to develop and utilize in the same manner as a Bitmap Resource (or byte array).

1001skins |
That's not a skin, it's some god awful piece of skinner gunk. - Mr. Jones
garetjax is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Skinning and Design > Classic Skins

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump