You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/10/04 14:05:28 UTC

[GitHub] sdedic opened a new pull request #942: Attempt to load PNG for legacy GIFs

sdedic opened a new pull request #942: Attempt to load PNG for legacy GIFs
URL: https://github.com/apache/incubator-netbeans/pull/942
 
 
   I have a branding problem :) because I'd like to brand NB application (icon, maybe splash) with a PNG image (because of alpha channel support), but the platform codebase looks for a GIF.
   
   There are several approaches; I don't want to rename the resource in platform, as that would surely break someone else's branding set up for .gif image. One possibility is to publish a PNG disguised with .gif extension - the existing code would attempt to read it using auto-detection, so it would succeed by detecting PNG (despite the extension).
   
   But I would rather propose a change that attempts to first read a .png for .gif resources. PNG is the recommended format anyway. The change will double the number of `Classloader.getResource` calls - but the result will be cached under the originally requested name, so no (much) harm should be done at least not long-term.
   
   I originally thought that I'd make PNG as fallback for (missing) GIFs, but that would not work well for branding, which just adds resources, but cannot remove them.
   
   Simple measurement counters show that on startup, extra 1450 `getResource()` calls are made, total 123ms

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists