Page 2 of 3
Re: Base64 encoded icons in XY.
Posted: 18 Nov 2023 20:04
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/
Re: Base64 encoded icons in XY.
Posted: 18 Nov 2023 23:41
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)
Re: Base64 encoded icons in XY.
Posted: 19 Nov 2023 10:34
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.
Re: Base64 encoded icons in XY.
Posted: 19 Nov 2023 12:03
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)
Re: Base64 encoded icons in XY.
Posted: 19 Nov 2023 12:16
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,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHoSURBVDhPrZFPSxtBGMZzUGo/hRcpPWRnN24pveVcv4AgokLC7G5ixNhL68VLi/UfmGoOPfVQIdSqm4ybuBhtYqDaYoIn8QMoBS89tBdbnJ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HCCCQAZzP3n7UAHGMVOUY7PXVGNRlJRhC7Y3BBribajMYqMiCsZuJFljs3aeviqCwBbEBAghkAMuff//AnFcfPoNsACt6/u4jhH77Ee58GBvoZU5YDAIEEIhgZIQGyMOXbxmaFm9lEOXnYTh3+xFY8eHLtxnefoLE2rWHzzHCBCCAWNAFQIaAMDLAphEGAAKIiYFCABBAFBsAEEBMkED5/xtEK0mKvmViYoJnDlx8YCD+hokBBBDIgF+fvn1/raMova421jvFx0J3LhMj4z8zDYU9QH4yOt/FSHPC95+/XsGSMkAAMQDzAvv524/kgLQYEPMCsfTl+0/tgLQiEPNg4QsD+SA2FygfAQQQLDOBohHmVEYkL/7HwkdRDxBgAFyo4n+QFoAyAAAAAElFTkSuQmCC";
Re: Base64 encoded icons in XY.
Posted: 19 Nov 2023 17:33
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==
Re: Base64 encoded icons in XY.
Posted: 19 Nov 2023 18:45
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.
Re: Base64 encoded icons in XY.
Posted: 19 Nov 2023 18:57
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==");
Re: Base64 encoded icons in XY.
Posted: 19 Nov 2023 19:04
by admin
Hm, just saw that the above example works only one time per session.

Well, all this is not incredibly easy, I'll come back to it later.
...
PS: easy fix, next beta...

Re: Base64 encoded icons in XY.
Posted: 14 Dec 2023 18:21
by eil
Just in case, little reminder, since it's half December already.
Re: Base64 encoded icons in XY.
Posted: 15 Dec 2023 02:28
by RalphM
eil: Did you see the PS in the post above yours?
Are you claiming that this doesn't work as discussed?
Re: Base64 encoded icons in XY.
Posted: 15 Dec 2023 09:08
by eil
RalphM: example works well, but i'm reminding about full-on support(for catalog, tabs, etc).
Re: Base64 encoded icons in XY.
Posted: 22 Dec 2023 15:26
by admin
It will come, but the prio is lower than some other stuff.
Re: Base64 encoded icons in XY.
Posted: 01 Mar 2024 21:36
by eil
Reminding.
Re: Base64 encoded icons in XY.
Posted: 29 Oct 2024 19:23
by eil
Reminding! Since it didn't come last year, maybe this Christmas can bring base64-icons support anywhere in XY.
