Setting PNG as icon for user button shows incorrect image

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
Post Reply
Patrick Schönbach
Posts: 70
Joined: 26 Apr 2015 15:25

Setting PNG as icon for user button shows incorrect image

Post by Patrick Schönbach »

Hello,

if I try to associate a PNG icon to a user button, I see the correct preview in the "Browse" dialog, however, the button itself shows the icon of the viewer associated to PNG files, not the image contents themselves.
Regards,
Patrick
http://www.klangexzellenz.de

Windows 11
Screen Scaling Percentage: 150%

kodyman
Posts: 222
Joined: 09 Apr 2011 04:05

Re: Setting PNG as icon for user button shows incorrect imag

Post by kodyman »

To use a PNG image an an icon it first has to be converted to an icon (.ico) format.
Here's a link I found that lists some programs and sites to help with the conversion.
http://answers.microsoft.com/en-us/wind ... 7c26ae13d9

Others correct me if I've missed something in XY that allows regular images to be used.

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Setting PNG as icon for user button shows incorrect imag

Post by bdeshi »

XY only supports ico and exe (first embedded icons are used for exes) and there's crude support for cur and ani. other extensions puts the icon for that extension (CFIs + system).
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Setting PNG as icon for user button shows incorrect imag

Post by admin »

Well, I'm a listening author ... :beer: ... and I didn't hear this question for the first time, so I added support for PNG, JPG, GIF, BMP, TIF. Next beta...

PS: My photo drop stack now has a picture of Betty Davis (400x400 JPEG):
To see the attached files, you need to log into the forum.

Stef123

Re: Setting PNG as icon for user button shows incorrect imag

Post by Stef123 »

:appl: An old wish of mine come true. Now that I've dealt with converters and ico-spacers :blackstorm: That's life. Not always does the early bird catch the worm.

A note-worthy side-effect: It's become easier to generate empty spacer-buttons with fully transparent gif or png
Looks better and cleaner imo than several separators side by side or using the ini-tweak ToolbarSepFac=2-10

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Setting PNG as icon for user button shows incorrect imag

Post by bdeshi »

Don, would it be possible to somehow use different files or better, different areas of the file as large and small btn icon?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Setting PNG as icon for user button shows incorrect imag

Post by admin »

SammaySarkar wrote:Don, would it be possible to somehow use different files or better, different areas of the file as large and small btn icon?
Technically yes, but it seems to be a bit overdone at the moment.

nerdweed
Posts: 653
Joined: 25 Feb 2012 07:47
Location: XY64 Latest Beta , Win 11, 96dpi, 100%

Re: Setting PNG as icon for user button shows incorrect imag

Post by nerdweed »

I was surprised to see this in change log last night.

Everything Everywhere - Could you add this support to portable file icons as well please.

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Setting PNG as icon for user button shows incorrect imag

Post by admin »

That would be too slow. As I mentioned in the change log... :whistle:

bdeshi
Posts: 4256
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612
Contact:

Re: Setting PNG as icon for user button shows incorrect imag

Post by bdeshi »

admin wrote:That would be too slow. As I mentioned in the change log... :whistle:
There's always the Tweak-force.
admin wrote:
SammaySarkar wrote:Don, would it be possible to somehow use different files or better, different areas of the file as large and small btn icon?
Technically yes, but it seems to be a bit overdone at the moment.
okay, no big deal [yet].
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

nerdweed
Posts: 653
Joined: 25 Feb 2012 07:47
Location: XY64 Latest Beta , Win 11, 96dpi, 100%

Re: Setting PNG as icon for user button shows incorrect imag

Post by nerdweed »

admin wrote:That would be too slow. As I mentioned in the change log... :whistle:
Trying to understand, what would cause the slowness
1. Would the non ico formats be converted to ico and then rendered.
2. Large dimensions of images - Possibily we can reuse the thumb cache

P.S. This is neither air nor water - I can live without it 8)

admin
Site Admin
Posts: 67271
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Setting PNG as icon for user button shows incorrect imag

Post by admin »

"The graphics are live-loaded from disk."

*everytime* they are displayed in a new screen position...

Post Reply