Transparent Icon

Just starting out? Need help? Post your questions and find answers here.
donSHAYA
User
User
Posts: 95
Joined: Wed Mar 25, 2009 9:57 am

Transparent Icon

Post by donSHAYA »

Hi Everybody

How can you make the background transparent on your icon, instead of having the backround on white? The icon you use on your top-left of the window, and the icon on the Taskbar, and the icon on your desktop. Just like when you double-click on you PureBasic.exe. The PureBasic.exe has a transparent background. How can I do that?

Thank you.
User avatar
Arctic Fox
Enthusiast
Enthusiast
Posts: 609
Joined: Sun Dec 21, 2008 5:02 pm
Location: Aarhus, Denmark

Re: Transparent Icon

Post by Arctic Fox »

You can use an icon editor application which replaces the white background with a transparent one. You can try out this one http://icofx.ro/
donSHAYA
User
User
Posts: 95
Joined: Wed Mar 25, 2009 9:57 am

Re: Transparent Icon

Post by donSHAYA »

PureBasic won't load the .ico file?
User avatar
Arctic Fox
Enthusiast
Enthusiast
Posts: 609
Joined: Sun Dec 21, 2008 5:02 pm
Location: Aarhus, Denmark

Re: Transparent Icon

Post by Arctic Fox »

In Compiler Options?
donSHAYA
User
User
Posts: 95
Joined: Wed Mar 25, 2009 9:57 am

Re: Transparent Icon

Post by donSHAYA »

It uploads it, but when I execute the program, windows just shows the default windows-icon.
User avatar
Arctic Fox
Enthusiast
Enthusiast
Posts: 609
Joined: Sun Dec 21, 2008 5:02 pm
Location: Aarhus, Denmark

Re: Transparent Icon

Post by Arctic Fox »

Are you using the right file path (in case you typed it in the path field)?
donSHAYA
User
User
Posts: 95
Joined: Wed Mar 25, 2009 9:57 am

Re: Transparent Icon

Post by donSHAYA »

the file path is .ico. The file name is "icon.ico"

I browsed the icon from "Compiler Options"

Even the windows picture-viewer can't read the image. It's maybe becaue I have saved the icon wrong from the program?
User avatar
Arctic Fox
Enthusiast
Enthusiast
Posts: 609
Joined: Sun Dec 21, 2008 5:02 pm
Location: Aarhus, Denmark

Re: Transparent Icon

Post by Arctic Fox »

If you used IcoFX you can create multiple icon formats in one single file. Load the original icon/image, click the Insert new image button and choose the new format (32-bit needed for transparent icons).
donSHAYA
User
User
Posts: 95
Joined: Wed Mar 25, 2009 9:57 am

Re: Transparent Icon

Post by donSHAYA »

Thank you so much :)
User avatar
Arctic Fox
Enthusiast
Enthusiast
Posts: 609
Joined: Sun Dec 21, 2008 5:02 pm
Location: Aarhus, Denmark

Re: Transparent Icon

Post by Arctic Fox »

You are very welcome :)
Does it work now?
akj
Enthusiast
Enthusiast
Posts: 668
Joined: Mon Jun 09, 2003 10:08 pm
Location: Nottingham

Re: Transparent Icon

Post by akj »

IcoFX seems to be a very good icon editor. I certainly handles transparency more simply than many similar editors and can import/export some useful image formats.
Anthony Jordan
User avatar
Arctic Fox
Enthusiast
Enthusiast
Posts: 609
Joined: Sun Dec 21, 2008 5:02 pm
Location: Aarhus, Denmark

Re: Transparent Icon

Post by Arctic Fox »

It is very good indeed, it has lots of features - I have not had any problems with it so far :D
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: Transparent Icon

Post by Vera »

Hello,

though I like IcoFx very much myself, I should let you know about troubles with it reported in the german forum last month: Windows-Frage: Kompilate und ihre Icons...

As far as I understood, the problem was that, on Vista, an icon made with IcoFx would not show up in fullsize as desktop-link if it's the application-icon. (It appeared ok if it was used as manually chosen icon for a link.)

Someone else then found out that, compared with two other icon-programs (Paint.Net and VariIcons), IcoFx reduces the iconsize by 100kb when saving it and this was the reason for the effect. Unfortunately they didn't mention which version they used or tried to find out if it maybe due to a special IcoFx-setting.

greetings ~ Vera
akj
Enthusiast
Enthusiast
Posts: 668
Joined: Mon Jun 09, 2003 10:08 pm
Location: Nottingham

Re: Transparent Icon

Post by akj »

In private emails to me Attila Kovrig, the author of IcoFX, made these comments about the problem reported by Vera:
The problem is not on the side of IcoFX. The problem is with PureBasic. With Windows Vista, Microsoft introduced a new icon format where the 256x256 image is compressed as a png image (resulting in a smaller size). It seems that PureBasic cannot handle this new format . Make sure that "Preferences/Options/Compress 256x256 images for Windows Vista" check box in not checked and then IcoFX will not compress the image when you save it (old format). This will result in a larger icon, but should work fine with older programs that cannot handle the new icon format.
You can also change the icon of an exe after the build process. You can build your application with a temporary icon using PureBasic. Once you have the exe file you can change the icon with a Vista ready icon using the built in resource editor of IcoFX: http://icofx.ro/tutorials/tutorial5.html
Anthony Jordan
User avatar
Vera
Addict
Addict
Posts: 858
Joined: Tue Aug 11, 2009 1:56 pm
Location: Essen (Germany)

Re: Transparent Icon

Post by Vera »

Dear akj,

thanks a lot for your successful engagement :)
and preserving IconFxs reputation :wink:

I'll post your answer in the german forum as well to set things right

regards ~ Vera
Post Reply