Possible DATAURI bug

Having trouble with the game? Report issues and get help here. Read this first!

Moderators: Forum Moderators, Developers

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
User avatar
Gwledig
Posts: 509
Joined: March 30th, 2009, 5:10 pm
Location: UK

Possible DATAURI bug

Post by Gwledig » July 27th, 2019, 10:50 am

Hi I just thought I'd report what looks like a bug with DATAURI -

https://wiki.wesnoth.org/DataURI

When using DATAURI images (generated from a range of places like Firefox as shown in the WML page or 3rd party sources online) this works when added as an image in [option] image= but not in other locations as suggested in the DATAURI support page, I can't for instance get DATAURIs working in overlays= in a [unit] or within an [event] to replace unit overlays or animations... it would certainly be good if this worked properly so special non-core units artwork could be used in multiplayer mods, removing the need to download the mod for players to join.

As mentioned the following does work in option -

Code: Select all

[option]
image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAIW0lEQVR4nO3acUyTZx4H8Gf03mWZO2Luj7Okd+CWmY1BDLTRzGxWjA4j16zEk+1KgSFEZqEsjBY6REZRottRsCegKwisws0hKYGx6cGcCqikFbiY8xaSbTLvrou3SJbtn/vr8r0/6PPsed/2BZcMCsf7TZ4YKZo+n/6e3/M8bQlRokSJEiVKlChRokSJEiVKlIQnQaNBtJ/Dik2CRoPCkgqseaTUpERIByFrHIjH8Hk72BgZ9GFk0Mcey8yxrB0gHqWRZLLRRXJFSJGgov3clyxyldJFckVIaxIqQaOBt8WNkUFf2MR5qEhDDqqqtBhVpcWrH4riFJZUiCaoQIUiBeInOD0xjuGBPlmoIWIJG/zvDA/4bvb0T6KnfxJVpcVwVpT/N9rz/cmhQJk5ljCE4YE+TE+M/ySo66QCc6QR0xPj0KZuh1arh1arBw9VV2lbHRWVoNFgeKCPAVGE4YE+9vOHgRoe6MMQseC7F87gNwmJ2PRUMrY+p8OWjc+CEIJHYwSYs/JFUHWVNhSZTaIRbY+w0OrxeTtQWFLBYKYnxuHzdrDH5CqK/7tWq0fCxmTEEBWeIgT7CUFdghqjJ6rR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Ym1/ykQ49bHM3Yk2FaebvTUiUSVMRvwXIHv1XVY36uyFUUhZE506y9SKHWdNUsFL6hR/u5KFGiRIkSJUqUKFGiRIkSJUqU/J/mf/iRGIYU8UM8AAAAAElFTkSuQmCC"
label=_" Starship Builder - 1 Gold
HP: 20
Build (build fortifications - right click to use)
Repair (repairs +8 hp when near mechanical units/structures)
10-1 Damage
7 Movement"
when using DATAURI as an overlay= in [unit] e.g.

Code: Select all

[unit]
race=mechanical
description=A starship
level=1
unrenamable=yes
overlays="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAIW0lEQVR4nO3acUyTZx4H8Gf03mWZO2Luj7Okd+CWmY1BDLTRzGxWjA4j16zEk+1KgSFEZqEsjBY6REZRottRsCegKwisws0hKYGx6cGcCqikFbiY8xaSbTLvrou3SJbtn/vr8r0/6PPsed/2BZcMCsf7TZ4YKZo+n/6e3/M8bQlRokSJEiVKlChRokSJEiVKlIQnQaNBtJ/Dik2CRoPCkgqseaTUpERIByFrHIjH8Hk72BgZ9GFk0Mcey8yxrB0gHqWRZLLRRXJFSJGgov3clyxyldJFckVIaxIqQaOBt8WNkUFf2MR5qEhDDqqqtBhVpcWrH4riFJZUiCaoQIUiBeInOD0xjuGBPlmoIWIJG/zvDA/4bvb0T6KnfxJVpcVwVpT/N9rz/cmhQJk5ljCE4YE+TE+M/ySo66QCc6QR0xPj0KZuh1arh1arBw9VV2lbHRWVoNFgeKCPAVGE4YE+9vOHgRoe6MMQseC7F87gNwmJ2PRUMrY+p8OWjc+CEIJHYwSYs/JFUHWVNhSZTaIRbY+w0OrxeTtQWFLBYKYnxuHzdrDH5CqK/7tWq0fCxmTEEBWeIgT7CUFdghqjJ6rR+8kALo+N463KGqTvzIRWq0fAH4SrrgaBKyNsrCgoHsfb4kZqUqIIhwfimzCFoZWg1eqhiU/GE796Go8+tgH2QyU4X2PHxe1xmC3bj391n8HXnW7cG/wQf/v0Enq6e9HTP4mtW3ci4A/C0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ng warning: Interlace handling should be turned on when using png_read_image
20190727 11:55:21 error display: Invalid encoding in data URI
20190727 11:55:21 error display: could not open image 'iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAIW0lEQVR4nO3acUyTZx4H8Gf03mWZO2Luj7Okd+CWmY1BDLTRzGxWjA4j16zEk+1KgSFEZqEsjBY6REZRottRsCegKwisws0hKYGx6cGcCqikFbiY8xaSbTLvrou3SJbtn/vr8r0/6PPsed/2BZcMCsf7TZ4YKZo+n/6e3/M8bQlRokSJEiVKlChRokSJEiVKlIQnQaNBtJ/Dik2CRoPCkgqseaTUpERIByFrHIjH8Hk72BgZ9GFk0Mcey8yxrB0gHqWRZLLRRXJFSJGgov3clyxyldJFckVIaxIqQaOBt8WNkUFf2MR5qEhDDqqqtBhVpcWrH4riFJZUiCaoQIUiBeInOD0xjuGBPlmoIWIJG/zvDA/4bvb0T6KnfxJVpcVwVpT/N9rz/cmhQJk5ljCE4YE+TE+M/ySo66QCc6QR0xPj0KZuh1arh1arBw9VV2lbHRWVoNFgeKCPAVGE4YE+9vOHgRoe6MMQseC7F87gNwmJ2PRUMrY+p8OWjc+CEIJHYwSYs/JFUHWVNhSZTaIRbY+w0OrxeTtQWFLBYKYnxuHzdrDH5CqK/7tWq0fCxmTEEBWeIgT7CUFdghqjJ6rR+8kALo+N463KGqTvzIRWq0fAH4SrrgaBKyNsrCgoHsfb4kZqUqIIhwfimzCFoZWg1eqhiU/GE796Go8+tgH2QyU4X2PHxe1xmC3bj391n8HXnW7cG/wQf/v0Enq6e9HTP4mtW3ci4A/C0/RHERKFWjE4kSqEB7pOKiIihSbBoAh5DIQQnHK78dW9WQS/vY9797/BzGAvvmpvxr+7PfjhzjTau7qQsdcIrVaP8bEvUWsrQ5HZxHAEIRaCEBt9ILltnO8x3hY35kgjfN4OXCcVDIkHIkI8BOGXDOrc+Q8wM/N3zH45g89nPsf4oA9DlbkYtP4eh15+CYdKHTh67F0crqphS81d70SR2QRBiEVqUiIK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ZCioRDX0X6hKVQJp0anQaCy/VGhkSXW//RQjZ5a4oKbx9r+8FZ3w6TTo2GjDhYU1RhOFqtHm3dnzGc0Pvb0rH8QLT5UiAKIS11OajctGQGRXE85fsROF7AqqSnPwBrigomnRrWFBVDoji0Ubd1fybCoR8EFJZU0NN1dJB83g4QQkTVIx0LQdElRXuQtEp6+idFMLSRE0Jgs1WLdjIeR6PeAI16A4M69/GNpUXigaQNezGgSFD030k+cWVg1hQVa8oUjsLQsRgQ/T2+mpYdSQokXWZyQ4rD73q0T9FGTXcyHslgMMBgMDAgi6NZ9P9KMKID9M7hSrZ9R9q95KCk1SOtPr5P8WCRgAwGAwOib6fwFckDSX4WHaQis2lBqIVwpifGF+xXJHxngjHrIIgQD4ujmf+cn1UM13uWHkcOiV4pzJlGmDON7FWXu47IAcn1KyJZjpEmLgEiZDl7z2JItGFToMWgiKTkF+tZ9Hdp440w8UhAhCx35UjzMEjSfhKpgqRffojUzBmGEC/anQgh2JNhWrlffpBeZqVAFIne5rnPsURVJLckCQckQgpBWRzNKxeHJkGjAX3faDEgNrnQnYzeu0gIaaFqkxz4QAhZXV/AolBySNL3g04eKUNDRlzEQyDhwOgylF4flmXbXopQKB6MVhetHvqeUP/RQky5s0VQJp1a1Gv4EeH7jqsPSBoKZXE0w+JoFi2x1iYXyt+worXJhdYm1/ykQ49bHM3Yk2FaebvTUiUSVMRvwXIHv1XVY36uyFUUhZE506y9SKHWdNUsFL6hR/u5KFGiRIkSJUqUKFGiRIkSJUqU/J/mf/iRGIYU8UM8AAAAAElFTkSuQmCC'
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)

gfgtdf
Developer
Posts: 1159
Joined: February 10th, 2013, 2:25 pm

Re: Possible DATAURI bug

Post by gfgtdf » July 27th, 2019, 11:58 am

That's probably because the china in the datauri is interpreted at a ipf argument separator, one might call this a bug but even if I'd be low.priority since datauris were mostly invented for pbl files, why don't you just add an image file to your add-on?
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.

User avatar
Gwledig
Posts: 509
Joined: March 30th, 2009, 5:10 pm
Location: UK

Re: Possible DATAURI bug

Post by Gwledig » July 27th, 2019, 3:09 pm

Well its a MP mod and im trying to keep it so DL is optional as we know from many years that players often dont bother downloading and struggle to figure out whats going on, rendering the mod pretty useless, I think Slowthink or Mabuse made their versions of Conquest DL dependent some years back and I remember this resulted in noone joining games.. I have a few more ideas to try...
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)

User avatar
Ravana
Moderator
Posts: 2156
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Possible DATAURI bug

Post by Ravana » July 27th, 2019, 3:19 pm

With 1.14 downloading is easy enough that I dont see problem anymore forcing download.

User avatar
Gwledig
Posts: 509
Joined: March 30th, 2009, 5:10 pm
Location: UK

Re: Possible DATAURI bug

Post by Gwledig » July 27th, 2019, 3:27 pm

Well the datauri page doesnt say its pbl only and is linked from quite a few other places so it does look like a bug esp as it works in option...
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)

User avatar
Pentarctagon
Forum Administrator
Posts: 3947
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Possible DATAURI bug

Post by Pentarctagon » July 27th, 2019, 3:51 pm

The PR adding DataURIs was to address an issue submitted to allow displaying add-on icon images that users don't have on their local PC. However, the wiki page also says:
This can be useful for add-on icons in the PblWML (which may otherwise only contain core images) or for single-file scenarios.
So... it looks could go either way, honestly. You could open an issue for it on github and @AI0867 to try and get an answer though, since he implemented the feature.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

gnombat
Posts: 215
Joined: June 10th, 2010, 8:49 pm
Contact:

Re: Possible DATAURI bug

Post by gnombat » July 27th, 2019, 4:30 pm

gfgtdf wrote:
July 27th, 2019, 11:58 am
That's probably because the china in the datauri is interpreted at a ipf argument separator, one might call this a bug but even if I'd be low.priority since datauris were mostly invented for pbl files, why don't you just add an image file to your add-on?
Just to clarify this: I think autocorrect somehow changed the word "comma" to "china" here. The description of overlays in https://wiki.wesnoth.org/SingleUnitWML says: "overlays: a comma-separated list of images that are overlayed on the unit". So presumably there's no way to use a data URI here because the comma in the data URI conflicts with the use of the comma to separate overlay images.

User avatar
Gwledig
Posts: 509
Joined: March 30th, 2009, 5:10 pm
Location: UK

Re: Possible DATAURI bug

Post by Gwledig » July 27th, 2019, 4:52 pm

interesting thanks, odd though that DATAURI works in [option] for image=... so presumably different code going on in there...
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)

gnombat
Posts: 215
Joined: June 10th, 2010, 8:49 pm
Contact:

Re: Possible DATAURI bug

Post by gnombat » July 27th, 2019, 5:04 pm

Gwledig wrote:
July 27th, 2019, 4:52 pm
interesting thanks, odd though that DATAURI works in [option] for image=... so presumably different code going on in there...
I think the difference is that one doesn't accept multiple (comma-separated) images. So, yes, the code is probably different there (there's no code splitting the value up at commas).

User avatar
Gwledig
Posts: 509
Joined: March 30th, 2009, 5:10 pm
Location: UK

Re: Possible DATAURI bug

Post by Gwledig » July 27th, 2019, 5:09 pm

Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)

User avatar
Gwledig
Posts: 509
Joined: March 30th, 2009, 5:10 pm
Location: UK

Re: Possible DATAURI bug

Post by Gwledig » July 28th, 2019, 2:01 pm

Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)

Post Reply