Bad dimensions fix?
Moderator: Forum Moderators
Forum rules
Before posting critique in this forum, you must read the following thread:
Before posting critique in this forum, you must read the following thread:
Bad dimensions fix?
Hi,
With my port project I'm coming up against a lot of bad dimension images such as
Is there a quick way of fixing these from the command line say with imagemagick?
With my port project I'm coming up against a lot of bad dimension images such as
Code: Select all
Detected an image with bad dimensions: units/monsters/fireghost-death6.png: 70x70
It will not be masked, please use: 72x72
- Lord-Knightmare
- Discord Moderator
- Posts: 2343
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Bad dimensions fix?
Just open the image and resize to 72x72. Also that graphic is still in core maybe so maybe just change the path to the core one?vghetto wrote: ↑December 3rd, 2021, 9:05 pm Hi,
With my port project I'm coming up against a lot of bad dimension images such asIs there a quick way of fixing these from the command line say with imagemagick?Code: Select all
Detected an image with bad dimensions: units/monsters/fireghost-death6.png: 70x70 It will not be masked, please use: 72x72
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Re: Bad dimensions fix?
Ha!Lord-Knightmare wrote: ↑December 3rd, 2021, 9:42 pm Also that graphic is still in core maybe so maybe just change the path to the core one?
I thought the mod had this image. When you said core has it, I found it strange that it didn't complain about file conflicts.
Turns out wesnoth was complaining about the bad dimensions in the core image!
Maybe a bug report should be opened about it.
Re: Bad dimensions fix?
It seems there's no error message when spawning and killing Fire Guardians (the unit whose death animation uses that image). Is the mod doing something more with it, such as using an image path function?
Re: Bad dimensions fix?
Yeah, it's adding them to the map as an item.
I just checked the files in core for 1.14 and 1.16. They are 70x70.
The mod in question is Brave_Wings
I just checked the files in core for 1.14 and 1.16. They are 70x70.
The mod in question is Brave_Wings
Code: Select all
#define BW_FG_APPEARANCE X Y
[item]
x,y={X},{Y}
image=units/monsters/fireghost-death6.png
[/item]
{BW_DELAY 75}
[remove_item]
x,y={X},{Y}
image=units/monsters/fireghost-death6.png
[/remove_item]
...
Re: Bad dimensions fix?
I guess a possible quick command-line fix for this general situation would be something like:
Given that the broken dimensions are less than 72x72.
Code: Select all
wesnoth --render-image "misc/blank-hex.png~BLIT(units/monsters/fireghost-death6.png)" fixed_dimensions.png
Re: Bad dimensions fix?
It has been a limitation of [item] 'image' key that images can't spill out of the hex, possibly "72x72" isn't strictly accurate (I don't know the code, just the usage). If you want a bigger (or animated) image, it needs to be in the 'halo' key, which isn't perfect either, so then you can use terrain graphics.
You can get a similar error by using a too-large image for a map editor button/icon.
You can get a similar error by using a too-large image for a map editor button/icon.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
| Abandoned: Tales of the Setting Sun
GitHub link for these projects