Base64 encoded icons in XY.

Features wanted...
admin
Site Admin
Posts: 60624
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Base64 encoded icons in XY.

Post by admin »

Yes, I've thought about that. There are actually some established prefixes like data:image/png;base64, and the like. But I would like something simpler along your lines for XY, probably "base64:" or something.

The latest version v25.10.0123 ignores any such prefixes in the string, so you can copy the whole shebang here, for example, and makecoffee will handle it:
https://jaredwinick.github.io/base64-image-viewer/

eil
Posts: 1622
Joined: 13 Jan 2011 19:44

Re: Base64 encoded icons in XY.

Post by eil »

It's a good decision to have own smaller, yet ignoring this data:image/png;base64, part - it will allow users to copy whole base64 codes without need to think if smth should be omitted.
Accidentally noticed a thing that would require enhancement: as usual format for adding icon to button or catalog item requires adding "|icon" in Caption, probably it will need to have some Edit button(just like for code adding) = current Caption line definitely doesn't handle big amount of text. Yeap, i accidentally tried to add icon to catalog item in latest beta, which resulted in totally blank Caption field.(though name still remained shown proper)
Win 7 SP1 x64 100% 1366x768

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

Re: Base64 encoded icons in XY.

Post by admin »

Yes, there are some things to take care of. I will come back to this probably in December (other stuff to do now).

FYI, the first areas I have in mind are Custom Columns of type "Script" and format "Icon", and scripted menus. Also the upcoming Status columns for cloud drives might use this technology.

eil
Posts: 1622
Joined: 13 Jan 2011 19:44

Re: Base64 encoded icons in XY.

Post by eil »

Out of curiosity, after mentioned first areas will be implemented, will it come to custom buttons/catalog and possibly everywhere where icons can be used in XY?(i'm just real hyped and can't hold myself from asking for full scale support chances)
Win 7 SP1 x64 100% 1366x768

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

Re: Base64 encoded icons in XY.

Post by admin »

We'll see. I'm a bit hyped myself and couldn't stop myself from implementing it (inofficially, not in change log) for custom columns (script / icon). This will work (show two icons in the column) in the next beta:

Code: Select all

return "data:image/png;base64,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iXY2aweyLwOFvsDkAAKIEeoCViBWm7Ru79Tzdx7bM+AAcmJC9wtDXBMEeDhPA7nfQWIAAcQElRNesf90IT7NIPDo1TvFBTuPtgGZ0iDLQWIAAQQygPnvv38KJ67dC2MgAly+/8zq+sPnplAvMwAEEMgAjkMXb9l+/Pqdl5mJiSHB3YqhItKDQUFcGKyBn5uTIT/IGYxB7H///jGeuvnAFyjFC5IHCCCQAZzP3n7UAHGMVOUY7PXVGNRlJRhC7Y3BBribajMYqMiCsZuJFljs3aeviqCwBbEBAghkAMuff//AnFcfPoNsACt6/u4jhH77Ee58GBvoZU5YDAIEEIhgZIQGyMOXbxmaFm9lEOXnYTh3+xFY8eHLtxnefoLE2rWHzzHCBCCAWNAFQIaAMDLAphEGAAKIiYFCABBAFBsAEEBMkED5/xtEK0mKvmViYoJnDlx8YCD+hokBBBDIgF+fvn1/raMova421jvFx0J3LhMj4z8zDYU9QH4yOt/FSHPC95+/XsGSMkAAMQDzAvv524/kgLQYEPMCsfTl+0/tgLQiEPNg4QsD+SA2FygfAQQQLDOBohHmVEYkL/7HwkdRDxBgAFyo4n+QFoAyAAAAAElFTkSuQmCC";

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

Re: Base64 encoded icons in XY.

Post by admin »

In the next beta (v25.10.0125) you can use base64 icons in scripted menus.
- Image type must be PNG
- Prefix must be data:png:base64, (no semi-colon here, else it breaks the syntax)

A menu item with icon (green tag, my test icon) can look like this now:

Code: Select all

Copy Path (Base64 Icon);#101;data:png:base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHoSURBVDhPrZFPSxtBGMZzUGo/hRcpPWRnN24pveVcv4AgokLC7G5ixNhL68VLi/UfmGoOPfVQIdSqm4ybuBhtYqDaYoIn8QMoBS89tBdbnJ2+b5iw698i+Fx2Z2d+7zzPs6F7kbVOBka2u5lZIEWDkbLJiDO8qbFEUZ2RR24XQF9eNp6K0aouDKb+Tu/ozfcXX58Iy1Fz8tjNwhvTNf2cMtKbKnU9MJnWl3Qjf8x11Rur6f8fAreWDZv8ksumaJ4cJ12NGwXVg+EwhKxFJ6JtcvuiIIIzuqNz01b60p+ePbQKav+wq/0FBzCA8FQ5IhIl7TRuK0P0vd4uMV8QYRMye4miJqDIE3xaYD8AHxl58mZkK3IGcT5LzBfYnMPC4EaR3IAhTBVBmNrkNXz/mdhQRaqqCMNRLnYyUYm2YVFYGGa+ArsAl4igBYWPuz3NTigL52j9UhwcgpvXwbH8Yz5bjfPVepbPVag3tqcJmg9nJeoL2wboB2Zu2g7Ay/sZvvRtiq8eLIhsIyli9qO4xHxhHGwbfyFmRts+/JbnGtNi7XBeLH9fuAq3NPihswPbxsJeuc89tI03t+CPu5M3w0Fh2+lat5itxPnKwbu7wS0ZTjiHhS3WLbCduRvcklVSMoMrXTG5DCgU+geauzhyUzjI0QAAAABJRU5ErkJggg==

eil
Posts: 1622
Joined: 13 Jan 2011 19:44

Re: Base64 encoded icons in XY.

Post by eil »

Hm, probably i'm doing smth wrong but pasting example into Script window of latest XY doesn't seem to work. First it gives lots of errors (like dubious syntax and else), then after wrapping "Copy Path (Base64 Icon)" into quotes it starts to show as a menu item, but no icon shown.
Win 7 SP1 x64 100% 1366x768

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

Re: Base64 encoded icons in XY.

Post by admin »

It's a menu item, try this:

Code: Select all

popupmenu("Copy Path (Base64 Icon);#101;data:png:base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHoSURBVDhPrZFPSxtBGMZzUGo/hRcpPWRnN24pveVcv4AgokLC7G5ixNhL68VLi/UfmGoOPfVQIdSqm4ybuBhtYqDaYoIn8QMoBS89tBdbnJ2+b5iw698i+Fx2Z2d+7zzPs6F7kbVOBka2u5lZIEWDkbLJiDO8qbFEUZ2RR24XQF9eNp6K0aouDKb+Tu/ozfcXX58Iy1Fz8tjNwhvTNf2cMtKbKnU9MJnWl3Qjf8x11Rur6f8fAreWDZv8ksumaJ4cJ12NGwXVg+EwhKxFJ6JtcvuiIIIzuqNz01b60p+ePbQKav+wq/0FBzCA8FQ5IhIl7TRuK0P0vd4uMV8QYRMye4miJqDIE3xaYD8AHxl58mZkK3IGcT5LzBfYnMPC4EaR3IAhTBVBmNrkNXz/mdhQRaqqCMNRLnYyUYm2YVFYGGa+ArsAl4igBYWPuz3NTigL52j9UhwcgpvXwbH8Yz5bjfPVepbPVag3tqcJmg9nJeoL2wboB2Zu2g7Ay/sZvvRtiq8eLIhsIyli9qO4xHxhHGwbfyFmRts+/JbnGtNi7XBeLH9fuAq3NPihswPbxsJeuc89tI03t+CPu5M3w0Fh2+lat5itxPnKwbu7wS0ZTjiHhS3WLbCduRvcklVSMoMrXTG5DCgU+geauzhyUzjI0QAAAABJRU5ErkJggg==");

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

Re: Base64 encoded icons in XY.

Post by admin »

Hm, just saw that the above example works only one time per session. :eh: Well, all this is not incredibly easy, I'll come back to it later. :cup:

...

PS: easy fix, next beta... :)

eil
Posts: 1622
Joined: 13 Jan 2011 19:44

Re: Base64 encoded icons in XY.

Post by eil »

Just in case, little reminder, since it's half December already.
Win 7 SP1 x64 100% 1366x768

RalphM
Posts: 1935
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: Base64 encoded icons in XY.

Post by RalphM »

eil: Did you see the PS in the post above yours?
Are you claiming that this doesn't work as discussed?
Ralph :)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)

eil
Posts: 1622
Joined: 13 Jan 2011 19:44

Re: Base64 encoded icons in XY.

Post by eil »

RalphM: example works well, but i'm reminding about full-on support(for catalog, tabs, etc).
Win 7 SP1 x64 100% 1366x768

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

Re: Base64 encoded icons in XY.

Post by admin »

It will come, but the prio is lower than some other stuff.

eil
Posts: 1622
Joined: 13 Jan 2011 19:44

Re: Base64 encoded icons in XY.

Post by eil »

Reminding.
Win 7 SP1 x64 100% 1366x768

Post Reply