<p>I talked to a friend of mine and he told me that it's possible to create an image in an image editor (gimp/photoshop) and then use it as a button . He said that's the way applications that have great GUIs do it. </p>

<p>He also said that there is a file describing which parts of the image make up the button.</p>

<p>Is this possible , or is he "crazy"? :)</p>

[{'answer_id': 73690, 'author': 'ScottStonehouse', 'author_id': 2342, 'author_profile': 'https://Stackoverflow.com/users/2342', 'pm_score': 2, 'selected': False, 'text': '<p>You can do anything, especially since you have no constraints re language, environment, etc.</p>\n'}, {'answer_id': 73697, 'author': 'Loofer', 'author_id': 5552, 'author_profile': 'https://Stackoverflow.com/users/5552', 'pm_score': 0, 'selected': False, 'text': '<p>Imagemaps I guess.\nNo seperate file describes the map, it is all part of the html document.</p>\n\n<p><a href="http://www.w3schools.com/TAGS/tag_map.asp" rel="nofollow noreferrer">http://www.w3schools.com/TAGS/tag_map.asp</a></p>\n'}, {'answer_id': 73699, 'author': 'Joel Anair', 'author_id': 7441, 'author_profile': 'https://Stackoverflow.com/users/7441', 'pm_score': 1, 'selected': False, 'text': '<p>In HTML, you could do:</p>\n\n<pre><code>&lt;input type="button" src="/path/to/image.png" /&gt;\n</code></pre>\n\n<p>Alternately, assigning an onclick event to an image causes that image to work similarly to a button:</p>\n\n<pre><code>&lt;img src="/path/to/image.png" onclick="function(){doSomething();}" /&gt;\n</code></pre>\n'}, {'answer_id': 73715, 'author': 'user12770', 'author_id': 12770, 'author_profile': 'https://Stackoverflow.com/users/12770', 'pm_score': 2, 'selected': False, 'text': '<p>No he is not crazy, you can use images on almost all GUI tools instead of buttons, they are generally an image on the button, or in some cases you can put the image on the screen and have an onclick event assigned to it.</p>\n'}, {'answer_id': 73719, 'author': 'Chris Marasti-Georg', 'author_id': 96, 'author_profile': 'https://Stackoverflow.com/users/96', 'pm_score': 3, 'selected': True, 'text': '<p>This needs to be clarified with a language of choice, etc.  In general, most languages (WinForms, Java AWT/SWT, etc) have an image or background image property that allows you to use images for buttons.  There are even skinning frameworks that will let you use images for all controls in an easy-to-define manner.</p>\n\n<p>If you are talking about HTML, there is a button input type that can allow an image to be used as a button for a form.</p>\n\n<p>@Vhaerun<br/>\n<a href="http://www.codeproject.com" rel="nofollow noreferrer">CodeProject</a> is a good place to find lots of skinning libraries.  I used <a href="http://www.codeproject.com/KB/library/SkinCtrl.aspx" rel="nofollow noreferrer">this one</a> a long time ago.  <a href="http://www.winamp.com" rel="nofollow noreferrer">Winamp</a> is a great example of a skinned application, where users can actually create their own templates to completely change the look of the application without changing code whatsoever.  Actually, most media players have some sort of skinning available.</p>\n'}, {'answer_id': 73731, 'author': 'Jacob', 'author_id': 8119, 'author_profile': 'https://Stackoverflow.com/users/8119', 'pm_score': 1, 'selected': False, 'text': '<p>If you\'re talking HTML you can use &lt;input type="image" src="myfile.png" /></p>\n\n<p>Specifications <a href="http://www.w3.org/TR/html401/interact/forms.html" rel="nofollow noreferrer">here</a></p>\n'}, {'answer_id': 73802, 'author': 'TheXenocide', 'author_id': 8543, 'author_profile': 'https://Stackoverflow.com/users/8543', 'pm_score': 2, 'selected': False, 'text': '<p>You haven\'t been very specific with your question so nobody is able to give you a definitive answer, but here\'s an attempt to do so without demeaning you:</p>\n\n<p>It\'s quite common for graphics designers (using tools like photoshop, gimp, etc.) to participate alongside developers for both desktop and web based applications. Web based applications can easily capture information about when an image is clicked and frequently people will either design the button with the text in the image file itself, or use background pictures/borders with plain text on top. There is not standard, per se, on how this is accomplished on the web, but plenty of sites serve as an example (try using Firebug with FireFox to inspect other sites and see how they do things).</p>\n\n<p>If the circumstance at hand is desktop oriented then the answer becomes much more complicated. Skinning is accomplished in many way and, depending on platforms and libraries being used, implementation specifics vary greatly. In it\'s most simple terms, most GUI frameworks (like GTK, QT, Windows Forms, Windows Presentation Foundation) include a basic picture control, and this control can usually process a "Click" event, which would allow it to function as a button, but if you want different states (pressed, disabled, etc.) you will have to invest more effort in such a thing; you also won\'t find this method suitable for replacing the rendering of all buttons in an application, but rather something you would do manually for each one, or write your own custom button control that uses your assets specifically.</p>\n\n<p>In terms of a file describing different images that combine as described in the file to override the rendering of the button this would lead me to believe you are either working with an already existent application  that is skinable (like Firefox or Winamp) or that he is speaking of some specific UI toolkit. I\'m not aware of this functionality being generally available in most of the common system-level UI toolkits.</p>\n\n<p>In the future you may wish to be more specific with your questions.</p>\n'}]
['https://Stackoverflow.com/questions/73674', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/11234/']