QEMU icon
Since some time, I urgently wanted to have an icon for QEMU. As I did not find one, I tried to design one, and here is the current result: http://qemu.weilnetz.de/qemu-icon.svg.
The following patch adds the icon and SDL related code to QEMU.
More patches will add an installer for Windows which also uses the new icon.
My website http://qemu.weilnetz.de/ already includes two installer executables and also uses the new QEMU icon as favicon.ico.
If you like it, you may use the icon for qemu.org or any GPL 2 conforming purpose, too.
My full code is (as always) available from
http://repo.or.cz/w/qemu/ar7.git.
It should be easy to add a new command line option which allows choosing any icon file, so several QEMU instances could use different icons. I did not add this, because I think that the UI related command line options need some redesign.
Kind regards,
Stefan Weil
PATCH 1/1 Add an qemu icon
The icon was designed using Inkscape.
It is licensed under GPL version 2 or later.
A bitmap file and code for its usage from SDL is added, too.
--- configure | 1 + pc-bios/qemu-icon.bmp | Bin 0 -> 2118 bytes pc-bios/qemu-icon.svg | 117 +++++++++++++++++++++++++++++++++++++++++++++++++ ui/sdl.c | 7 +++ 4 files changed, 125 insertions(+), 0 deletions(-) create mode 100644 pc-bios/qemu-icon.bmp create mode 100644 pc-bios/qemu-icon.svg
configure +1 -0
@@ -3233,6 +3233,7 @@ DIRS="tests tests/cris slirp audio block net pc-bios/optionrom" DIRS="$DIRS roms/seabios roms/vgabios" DIRS="$DIRS fsdev ui" FILES="Makefile tests/Makefile" +FILES="$FILES pc-bios/qemu-icon.bmp" FILES="$FILES tests/cris/Makefile tests/cris/.gdbinit" FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps" FILES="$FILES roms/seabios/Makefile roms/vgabios/Makefile"
pc-bios/qemu-icon.bmp new file binary +0 -0
pc-bios/qemu-icon.svg new file +117 -0
117 lines not on this page · raw message
ui/sdl.c +7 -0
@@ -818,6 +818,7 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)uint8_t data =0 ;DisplayAllocator *da;const SDL_VideoInfo *vi; +char *filename;#if defined(__APPLE__)/* always use generic keymaps */
@@ -846,6 +847,12 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) vi =SDL_GetVideoInfo (); host_format = *(vi->vfmt); + filename =qemu_find_file (QEMU_FILE_TYPE_BIOS ,"qemu-icon.bmp" ); +if (filename) { +SDL_WM_SetIcon (SDL_LoadBMP (filename),NULL ); +qemu_free (filename); + } + dcl =qemu_mallocz (sizeof (DisplayChangeListener)); dcl->dpy_update = sdl_update; dcl->dpy_resize = sdl_resize;
Signature · 1 line
1.7.2.3
[Qemu-devel] Re: [PATCH] Add a QEMU icon
Am 26.01.2011 20:23, schrieb Stefan Weil:
Quoted 8 lines
The icon was designed using Inkscape.
It is licensed under GPL version 2 or later.A bitmap file and code for its usage from SDL is added, too.
Signed-off-by Stefan Weil<[email protected]>---
Sorry, the subject line was wrong. please fix it before committing the patch.
Thanks,
Stefan Weil
Quoted 3 lines · Stefan Weil
Since some time, I urgently wanted to have an icon for QEMU. As I did not find one, I tried to design one, and here is the current result: http://qemu.weilnetz.de/qemu-icon.svg.
Nice job Stefan! :)
anyway, may I suggest something? What if the big O which is colored red and the "EMU" is colored blue? Big Red is somewhat more eye catching and means "daredevil", kinda alike FreeBSD red baby devil :)
Signature · 7 lines
regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
Am 27.01.2011 07:24, schrieb Mulyadi Santosa:
Quoted 11 lines · Stefan Weil
Quoted 3 lines
Since some time, I urgently wanted to have an icon for QEMU. As I did not find one, I tried to design one, and here is the current result: http://qemu.weilnetz.de/qemu-icon.svg.
Nice job Stefan! :)
anyway, may I suggest something? What if the big O which is colored red and the "EMU" is colored blue? Big Red is somewhat more eye catching and means "daredevil", kinda alike FreeBSD red baby devil :)
Hi,
thanks for your suggestion.
http://qemu.weilnetz.de/icon/ shows several color variations and uses a red/blue favicon for the web page.
I'll split my patch in a technical part (code, Makefile) and a separate icon part (this second patch will be delayed until I get more feedback - or maybe someone else wants to create another icon).
Regards,
Stefan
PATCH v2 1/1 ui: Load QEMU icon from SDL user interface
Load an optional QEMU icon file. If there is no icon file named qemu-icon.bmp in QEMU's default search path, QEMU will run with the usual system default icon.
A matching icon file will be loaded and used by X Windows managers or MS Windows while a QEMU instance is running.
SDL requires icon files in 32x32 bmp format.
v2:
The first version of this patch also included qemu-icon.bmp and rules to handle this file. That part will now be published in a separate patch as soon as the QEMU community has chosen a common QEMU icon. The SDL code here is useful to try different icons.
--- ui/sdl.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
ui/sdl.c +7 -0
@@ -818,6 +818,7 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)uint8_t data =0 ;DisplayAllocator *da;const SDL_VideoInfo *vi; +char *filename;#if defined(__APPLE__)/* always use generic keymaps */
@@ -846,6 +847,12 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) vi =SDL_GetVideoInfo (); host_format = *(vi->vfmt); + filename =qemu_find_file (QEMU_FILE_TYPE_BIOS ,"qemu-icon.bmp" ); +if (filename) { +SDL_WM_SetIcon (SDL_LoadBMP (filename),NULL ); +qemu_free (filename); + } + dcl =qemu_mallocz (sizeof (DisplayChangeListener)); dcl->dpy_update = sdl_update; dcl->dpy_resize = sdl_resize;
Signature · 1 line
1.7.2.3
Re: [Qemu-devel] [PATCH v2] ui: Load QEMU icon from SDL user interface
Hi Stefan,
Am 28.01.2011 um 19:53 schrieb Stefan Weil:
Quoted 16 lines
Load an optional QEMU icon file. If there is no icon file named qemu-icon.bmp in QEMU's default search path, QEMU will run with the usual system default icon.
A matching icon file will be loaded and used by X Windows managers or MS Windows while a QEMU instance is running.
SDL requires icon files in 32x32 bmp format.
v2:
The first version of this patch also included qemu-icon.bmp and rules to handle this file. That part will now be published in a separate patch as soon as the QEMU community has chosen a common QEMU icon. The SDL code here is useful to try different icons.
Quoted 2 lines
Cc Anthony Liguori <[email protected]>Signed-off-by Stefan Weil <[email protected]>
Might to explain this in more detail, please? A .bmp file is a device-independent bitmap. The whole point of Windows' icon format was to be device-dependent from 16x16 to 64x64 (or 128x128?) resolution and 2- to 32-bit color spaces.
So what does SDL do with it, and if SDL is limiting us here can't we add a .ico file and call the corresponding Win32 API function directly instead?
Regards,
Andreas
Re: [Qemu-devel] [PATCH v2] ui: Load QEMU icon from SDL user interface
Am 29.01.2011 13:43, schrieb Andreas Färber:
Quoted 23 lines
Hi Stefan,
Am 28.01.2011 um 19:53 schrieb Stefan Weil:
Quoted 16 lines
Load an optional QEMU icon file. If there is no icon file named qemu-icon.bmp in QEMU's default search path, QEMU will run with the usual system default icon.
A matching icon file will be loaded and used by X Windows managers or MS Windows while a QEMU instance is running.
SDL requires icon files in 32x32 bmp format.
v2:
The first version of this patch also included qemu-icon.bmp and rules to handle this file. That part will now be published in a separate patch as soon as the QEMU community has chosen a common QEMU icon. The SDL code here is useful to try different icons.Quoted 2 lines
Cc Anthony Liguori <[email protected]>Signed-off-by Stefan Weil <[email protected]>
Quoted 6 lines
Might to explain this in more detail, please? A .bmp file is a device-independent bitmap. The whole point of Windows' icon format was to be device-dependent from 16x16 to 64x64 (or 128x128?) resolution and 2- to 32-bit color spaces.
So what does SDL do with it, and if SDL is limiting us here can't we add a .ico file and call the corresponding Win32 API function directly instead?
Regards,
Andreas
Hi Andreas,
SDL offers only one function to set the icon for the window manager. This function takes a SDL_Surface * parameter, and there is only one SDL function to get an SDL_Surface from a file:
SDL_WM_SetIcon(SDL_LoadBMP(filename), NULL);
See http://www.libsdl.org/docs/html/sdlwmseticon.html and
http://www.libsdl.org/docs/html/sdlloadbmp.html for details.
Of course it is also possible to use another API to set the icon, but this would require different code for X, Win32, MacOS (?) and maybe others.
The SDL solution is very simple and works sufficiently good, so I don't think we need support for the native APIs even if they might result in slightly better looking icons.
Regards,
Stefan
PATCH v3 1/1 ui/sdl: Load optional QEMU icon
In reply to Stefan WeilLoad an optional QEMU icon file. If there is no icon file named qemu.bmp in QEMU's default search path, QEMU will run with the usual system default icon.
A matching icon file will be loaded and used by X Windows managers or MS Windows while a QEMU instance is running.
SDL requires icon files in 32x32x4 bmp format.
v2:
The first version of this patch also included qemu-icon.bmp and rules to handle this file. That part will now be published in a separate patch as soon as the QEMU community has chosen a common QEMU icon. The SDL code here is useful to try different icons.
v3:
White pixels are now used for transparency.
This needs a 16 colour bmp file.
--- ui/sdl.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)
ui/sdl.c +13 -0
@@ -816,6 +816,7 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)uint8_t data =0 ;DisplayAllocator *da;const SDL_VideoInfo *vi; +char *filename;#if defined(__APPLE__)/* always use generic keymaps */
@@ -848,6 +849,18 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) vi =SDL_GetVideoInfo (); host_format = *(vi->vfmt); +/* Load a 32x32x4 image. White pixels are transparent. */ + filename =qemu_find_file (QEMU_FILE_TYPE_BIOS ,"qemu-icon.bmp" ); +if (filename) { +SDL_Surface *image =SDL_LoadBMP (filename); +if (image) { +uint32_t colorkey =SDL_MapRGB (image->format,255 ,255 ,255 ); +SDL_SetColorKey (image,SDL_SRCCOLORKEY , colorkey); +SDL_WM_SetIcon (image,NULL ); + } +qemu_free (filename); + } + dcl =qemu_mallocz (sizeof (DisplayChangeListener)); dcl->dpy_update = sdl_update; dcl->dpy_resize = sdl_resize;
Signature · 1 line
1.7.2.3
[Qemu-devel] Re: [PATCH v3] ui/sdl: Load optional QEMU icon
Am 16.02.2011 21:15, schrieb Stefan Weil:
Quoted 58 lines
Load an optional QEMU icon file. If there is no icon file named qemu.bmp in QEMU's default search path, QEMU will run with the usual system default icon.
A matching icon file will be loaded and used by X Windows managers or MS Windows while a QEMU instance is running.
SDL requires icon files in 32x32x4 bmp format.
v2:
The first version of this patch also included qemu-icon.bmp and rules to handle this file. That part will now be published in a separate patch as soon as the QEMU community has chosen a common QEMU icon. The SDL code here is useful to try different icons.v3:
White pixels are now used for transparency.
This needs a 16 colour bmp file.Cc Anthony Liguori <[email protected]>Signed-off-by Stefan Weil <[email protected]>---
ui/sdl.c| 13 +++++++++++++1 files changed, 13 insertions(+), 0 deletions(-)ui/sdl.c +1
-0@@ -816,6 +816,7 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)uint8_t data =0 ;DisplayAllocator *da;const SDL_VideoInfo *vi; +char *filename;#if defined(__APPLE__)/* always use generic keymaps */
ui/sdl.c +12
-0@@ -848,6 +849,18 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) vi =SDL_GetVideoInfo (); host_format = *(vi->vfmt); +/* Load a 32x32x4 image. White pixels are transparent. */ + filename =qemu_find_file (QEMU_FILE_TYPE_BIOS ,"qemu-icon.bmp" ); +if (filename) { +SDL_Surface *image =SDL_LoadBMP (filename); +if (image) { +uint32_t colorkey =SDL_MapRGB (image->format,255 ,255 ,255 ); +SDL_SetColorKey (image,SDL_SRCCOLORKEY , colorkey); +SDL_WM_SetIcon (image,NULL ); + } +qemu_free (filename); + } + dcl =qemu_mallocz (sizeof (DisplayChangeListener)); dcl->dpy_update = sdl_update;
Quoted 1 line
dcl->dpy_resize=sdl_resize;
Ping. No comments? No commit?
Regards,
Stefan W.
Aurelien Jarno
AppliedRe: [Qemu-devel] [PATCH v3] ui/sdl: Load optional QEMU icon
In reply to Stefan WeilQuoted 20 lines · Stefan Weil
Load an optional QEMU icon file. If there is no icon file named qemu.bmp in QEMU's default search path, QEMU will run with the usual system default icon.
A matching icon file will be loaded and used by X Windows managers or MS Windows while a QEMU instance is running.
SDL requires icon files in 32x32x4 bmp format.
v2:
The first version of this patch also included qemu-icon.bmp and rules to handle this file. That part will now be published in a separate patch as soon as the QEMU community has chosen a common QEMU icon. The SDL code here is useful to try different icons.v3:
White pixels are now used for transparency.
This needs a 16 colour bmp file.
Quoted 5 lines
Cc Anthony Liguori <[email protected]>Signed-off-by Stefan Weil <[email protected]>--- ui/sdl.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-)
Thanks, applied.
Quoted 36 lines
ui/sdl.c +13
-0@@ -816,6 +816,7 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame)uint8_t data =0 ;DisplayAllocator *da;const SDL_VideoInfo *vi; +char *filename;#if defined(__APPLE__)/* always use generic keymaps */ @@ -848,6 +849,18 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) vi =SDL_GetVideoInfo (); host_format = *(vi->vfmt); +/* Load a 32x32x4 image. White pixels are transparent. */ + filename =qemu_find_file (QEMU_FILE_TYPE_BIOS ,"qemu-icon.bmp" ); +if (filename) { +SDL_Surface *image =SDL_LoadBMP (filename); +if (image) { +uint32_t colorkey =SDL_MapRGB (image->format,255 ,255 ,255 ); +SDL_SetColorKey (image,SDL_SRCCOLORKEY , colorkey); +SDL_WM_SetIcon (image,NULL ); + } +qemu_free (filename); + } + dcl =qemu_mallocz (sizeof (DisplayChangeListener)); dcl->dpy_update = sdl_update; dcl->dpy_resize = sdl_resize;Signature · 1 line
1.7.2.3
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net
Quoted 15 lines · Stefan Weil
Am 27.01.2011 07:24, schrieb Mulyadi Santosa:
Quoted 7 lines · Stefan Weil
Quoted 4 lines
Since some time, I urgently wanted to have an icon for QEMU. As I did not find one, I tried to design one, and here is the current result: http://qemu.weilnetz.de/qemu-icon.svg.
Quoted 6 lines
Nice job Stefan! :)
anyway, may I suggest something? What if the big O which is colored red and the "EMU" is colored blue? Big Red is somewhat more eye catching and means "daredevil", kinda alike FreeBSD red baby devil :)
Quoted 6 lines
Hi,
thanks for your suggestion.
http://qemu.weilnetz.de/icon/ shows several color variations and uses a red/blue favicon for the web page.
Here's some more bike shedding: The shape overall is almost OK, it is clear even at the favicon size. The EMU part could be a bit bigger to be more readable, if possible. But the black edges somehow remind me of Win 3.1 icons and primary colors without any effects are uncool. Red/blue version is not so bad.
Quoted 20 lines · Blue Swirl
Quoted 19 lines · Stefan Weil
Am 27.01.2011 07:24, schrieb Mulyadi Santosa:
Quoted 7 lines · Stefan Weil
Quoted 4 lines
Since some time, I urgently wanted to have an icon for QEMU. As I did not find one, I tried to design one, and here is the current result: http://qemu.weilnetz.de/qemu-icon.svg.
Quoted 6 lines
Nice job Stefan! :)
anyway, may I suggest something? What if the big O which is colored red and the "EMU" is colored blue? Big Red is somewhat more eye catching and means "daredevil", kinda alike FreeBSD red baby devil :)
Hi,
thanks for your suggestion.
Quoted 8 lines
Quoted 2 lines
http://qemu.weilnetz.de/icon/ shows several color variations and uses a red/blue favicon for the web page.
Here's some more bike shedding: The shape overall is almost OK, it is clear even at the favicon size. The EMU part could be a bit bigger to be more readable, if possible. But the black edges somehow remind me of Win 3.1 icons and primary colors without any effects are uncool. Red/blue version is not so bad.
I always liked the Q logo: http://www.kju-app.org/
Alex
Am 28.01.2011 23:19, schrieb Alexander Graf:
Quoted 13 lines · Blue Swirl
Quoted 10 lines · On Thu, Jan 27, 2011 at 9:18 PM, Stefan Weil <[email protected]…
Quoted 2 lines
http://qemu.weilnetz.de/icon/ shows several color variations and uses a red/blue favicon for the web page.
Here's some more bike shedding: The shape overall is almost OK, it is clear even at the favicon size. The EMU part could be a bit bigger to be more readable, if possible. But the black edges somehow remind me of Win 3.1 icons and primary colors without any effects are uncool. Red/blue version is not so bad.
Quoted 4 lines
I always liked the Q logo: http://www.kju-app.org/
Alex
Nice. I did not know the Q logo up to now and will add it to the QEMU icon contest page tomorrow.
Stefan