I was wondering how the hell do companies make them? Like Gimp has their own file extensions, Adobe has PDFs... how does this happen?
Custom extentions?
Page 1 of 111 Replies - 1044 Views - Last Post: 11 July 2009 - 09:25 AM
Replies To: Custom extentions?
#2
Re: Custom extentions?
Posted 09 July 2009 - 02:45 PM
You know. I have been wondering about this for a while to. I have always thought it interesting that various companies create new extensions for their programs (Blizzard has mpqs, Gimp has xcf, Photoshop has psd, etc.)
I think it is just how you encode the document that is different, but I really have no idea how it is done.
I think it is just how you encode the document that is different, but I really have no idea how it is done.
#3
Re: Custom extentions?
Posted 09 July 2009 - 02:49 PM
What exactly??
File formats are generally just a standardised (to this format) way to store data, could include different compression of the data within (JPEG vs GIF vs PNG, etc., or RAR vs ZIP vs 7z, etc.).
To register your own file extension you just set it up in the registry when your application is installed.
EDIT: For example... Our CMS Base system stores client records in a *.mcr (Mage(UK) Contact Record) file, that can be read/interpreted via the program, just by using that we can go through directories that contain other files searching just for contact records. That file extension is however a 3DS Max Macro file, so nothing's registered for either, it's just another file name.
File formats are generally just a standardised (to this format) way to store data, could include different compression of the data within (JPEG vs GIF vs PNG, etc., or RAR vs ZIP vs 7z, etc.).
To register your own file extension you just set it up in the registry when your application is installed.
EDIT: For example... Our CMS Base system stores client records in a *.mcr (Mage(UK) Contact Record) file, that can be read/interpreted via the program, just by using that we can go through directories that contain other files searching just for contact records. That file extension is however a 3DS Max Macro file, so nothing's registered for either, it's just another file name.
This post has been edited by MageUK: 09 July 2009 - 02:51 PM
#4
Re: Custom extentions?
Posted 09 July 2009 - 04:22 PM
NeoTifa, on 9 Jul, 2009 - 03:38 PM, said:
I was wondering how the hell do companies make them? Like Gimp has their own file extensions, Adobe has PDFs... how does this happen?
What, did you think there was some kind of special process to this? Not at all - they just make them up! The programmers come up with the format that they're going to use to serialize their data to disk and then they make up an extension to give those flies. That's all there is to it.
File extensions are nothing but a naming convention used to help identify the content of a file. There's nothing to stop anyone from coming up with a format of data file and making up a new extension for it. It doesn't even have to be a new file format! It might be a regular old text file that's just structured in a certain way, or maybe a ZIP archive where the contents are organized or named in a certain way. The extension doesn't even have to be unique! Programs can, and often do, generate files with the same extension, but a radically different format. It's just a convention to try to make things easier to manage.
#5
Re: Custom extentions?
Posted 09 July 2009 - 04:53 PM
They do it by creating/alerting file associations in the Registry. Whenever a link, icon, shortcut (or anything of the like) Windows checks the registry to see if it's a valid extension (which are generally created/altered during the programs installation) then opens the appropriate application for that file type.
#6
Re: Custom extentions?
Posted 09 July 2009 - 05:42 PM
Ah, I'd like to know how to make your program read them. Thanks a lot guys.
#7
Re: Custom extentions?
Posted 09 July 2009 - 07:42 PM
All you have to do is discover the format of the file you want to open. Like a bitmap has a specific file format that you can find if you search it on the Internet. You would use some sort of binary file reader/writer to read and write the file. You would decode the file using the format as a template and write the file using the template.
It would be like any type of file that you would open. Like when a web browser opens an HTML file. The web browser knows the format of the HTML file and knows how to read it in and process it. It would be the same for Java bytecode. The Java platform know the format of the bytecode and can execute the programs. The Java compiler writes it out in the proper format.
It would be like any type of file that you would open. Like when a web browser opens an HTML file. The web browser knows the format of the HTML file and knows how to read it in and process it. It would be the same for Java bytecode. The Java platform know the format of the bytecode and can execute the programs. The Java compiler writes it out in the proper format.
#8
Re: Custom extentions?
Posted 09 July 2009 - 07:48 PM
PsychoCoder, on 9 Jul, 2009 - 05:53 PM, said:
They do it by creating/alerting file associations in the Registry.
Exactly!
When you double click an icon (or file) the OS (Windows) has a centralized repository of what program is associated (or will execute to handle) that file.
So you could theoretically make your own dat reader to open every .dat file you download. Or when you install WinZip (or WinRar) Windows will use whatever compression reader that you assign to it, thus changing the displayed icon in explorer.
#9
Re: Custom extentions?
Posted 09 July 2009 - 08:24 PM
... what? XD Those are really big words...
#10
Re: Custom extentions?
Posted 10 July 2009 - 02:25 AM
#11
Re: Custom extentions?
Posted 10 July 2009 - 02:40 AM
#12
Re: Custom extentions?
Posted 11 July 2009 - 09:25 AM
Oh ok. Now explaining how to make them and have your program read them in that kind of termanology would be nice.
Page 1 of 1
|
|

New Topic/Question
Reply






MultiQuote






|