What file type would be the best?


(Martí Angelats i Ribera) #1

I’m creating a GUI Library and the part i’m working now is an Skin system to allow people to share their work easily.

Becouse of the main information is the graphics of that skin, i thought about using the firsts pixel lines of the top to save the information but a friend said me that would be better to use a custom binary file wich contains the image.

Which do you think is the best option? (Maybe you came out with another solution).


(rostok) #2

I am assuming you are meeting the requirement to have all necessary data in one single file. I would go for XML, You have pretty versatile options to include both various parameters and binary data like skin image as well. As alternative you may use single image file (PNG for examle) and encode exta info in metadata. XML is easy to modify, PNG with metadata has advantage of fast and easy preview. Both of those traits will be missing in custom binary format.


(Martí Angelats i Ribera) #3

I didn’t know you could save binary data in XML (i haven’t worked with them before and i’d never heared that).


(Ultima2876) #4

What about a zip containing pngs and an XML file? KISS principle.


(Martí Angelats i Ribera) #5

Don’t you need another library to compress or decompress? If so, can i add a library into my library?


(Ultima2876) #6

True, you would - though including another library within yours isn’t a problem (just make sure to check the licensing requirements!)


(Zachary Lewis) #7

Take a look at how Feathers handles it. That would probably be a good place to start.