This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 140104 - RCP application icon transparency corrupted by branding editor
Summary: RCP application icon transparency corrupted by branding editor
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 3 votes (vote)
Assignee: rmichalsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-15 14:34 UTC by bruehlicke
Modified: 2009-01-05 12:07 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Branding 'icon' Image PNG (4.22 KB, image/png)
2009-01-03 18:14 UTC, willfarnaby
Details
Branding 'icon' image (16x16) (1.01 KB, image/gif)
2009-01-03 19:14 UTC, willfarnaby
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bruehlicke 2008-07-15 14:34:48 UTC
This issue has been discussed on the dev@openide.netbeans.org multiple times (March 8th 2008, July 15th 2008). Below
some of the discussions around this and workarounds. 

It is about that the application icon looses its transparency after you have done some modification with the branding
Editor. Current workaround is to overwrite the icon for each build (see modification of build.xml suggestion below)




We had this discussion back in Mar 7  see below part of the discussion.

Platonov is right, it gets corrupted every time.  Tony Kohar gave the answer to modify your build.xml to simply replace
the file(s) at every build.

I will try to look through the bug database and see if this is a recorded bug and else create one.

Thanx
B-)


Hi,


On Sat, Mar 8, 2008 at 5:51 AM, David Beer <david.m.beer@btinternet.com> wrote:
> Hi
>
>  Thanks for your suggestion placing three different gif files in
>  <mysuite>/branding/core/core/jar/org/netbeans/core/startup/ works. So I
>  have frame.gif = 16x16 frame32.gif = 32x32 and a frame48.gif = 48x48.
>
>  Does anyone know why it looses its transparency.
>

From my experience the update of the icon is occurred when you editing
the project properties using the GUI. And why it is losing the
transparency is (my opinion, I haven't check the source code) netbeans
conversion Image algorithm from something.jpg,gif,png to gif file
somewhat loosing the transparency.

As usually this can be workarounded by override the build ant script.
This is the my workaround:
- put your good copy (have transparency) in the root dir of the suite
(or any place)
- override the build scrip of Netbeans Platform, so everytime it build
(not compile) it will copy the good image to replace the old

<!-- override to add my branding eg: replace frame icon -->
<target name="build" depends="build-brand,suite.
build"/>

<target name="build-brand" depends="-init">
      <!-- do your own other branding as needed -->
      ....

      <!-- this is the copy part to replace bad image to good image -->
       <copy todir="${basedir}/branding/core/core.jar/org/netbeans/core/startup/"
overwrite="true">
           <fileset dir="${basedir}">
               <include name="frame.gif"/>
               <include name="frame32.gif"/>
               <include name="frame48.gif"/>
           </fileset>
       </copy>
</target>
Comment 1 Jesse Glick 2008-07-31 22:02:19 UTC
Looks to have been misfiled.
Comment 2 rmichalsky 2008-08-29 13:04:57 UTC
fixed locally, changeset #bdae902aa00a
Comment 3 Quality Engineering 2008-08-30 05:34:37 UTC
Integrated into 'main-golden', available in build *200808300201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/bdae902aa00a
User: Richard Michalsky <rmichalsky@netbeans.org>
Log: #140104: preserve transparency in branding icon
Comment 4 willfarnaby 2009-01-03 18:12:05 UTC
Does NOT work for me in NetBeans 6.5.

(Windows XP SP3, Java SE Runtime Environment (build 1.6.0_12-ea-b02)
Java HotSpot(TM) Client VM (build 11.2-b01, mixed mode, sharing))

Am I supposed to be able to supply PNG with transparency? Does not work - transparency not preserved.
Am I supposed to be able to supply GIF with transparency? Does not work - transparency not preserved.
Comment 5 willfarnaby 2009-01-03 18:14:29 UTC
Created attachment 75421 [details]
Branding 'icon' Image PNG
Comment 6 willfarnaby 2009-01-03 19:13:12 UTC
Why is it necessary to use the GIF format anyway? It's simply painful.
Comment 7 willfarnaby 2009-01-03 19:14:41 UTC
Created attachment 75424 [details]
Branding 'icon' image (16x16)
Comment 8 willfarnaby 2009-01-03 21:47:01 UTC
OK, I think this does work correctly. My mistake. Still have this question (why not PNG...): "Why is it necessary to use
the GIF format anyway? It's simply painful."
Comment 9 rmichalsky 2009-01-05 12:07:20 UTC
Re: "Why is it necessary to use the GIF format anyway? It's simply painful.": It is not necessary, it can be PNG, but
the suffix must still be ".gif" (don't know why, I presume from historical reasons), see issue #148986.