Borders on portraits
Moderator: Forum Moderators
Borders on portraits
Some of the portraits, such as those of Konrad and Delfador, have a small, 1 pixel border around them. However, most of them don't; see, for example, the Asheviere portrait.
Now, it seems to me we should have the same style for all of our portraits. So, do we want the border, or not? I suspect we do. If so, how would one go about adding the border to all the portraits that are missing it?
Now, it seems to me we should have the same style for all of our portraits. So, do we want the border, or not? I suspect we do. If so, how would one go about adding the border to all the portraits that are missing it?
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
-
- Retired Developer
- Posts: 2633
- Joined: March 22nd, 2004, 11:22 pm
- Location: An Earl's Roadstead
Re: Borders on portraits
One word: ImageMagick.turin wrote:Some of the portraits, such as those of Konrad and Delfador, have a small, 1 pixel border around them. However, most of them don't; see, for example, the Asheviere portrait.
Now, it seems to me we should have the same style for all of our portraits. So, do we want the border, or not? I suspect we do. If so, how would one go about adding the border to all the portraits that are missing it?
"you can already do that with WML"
Fight Creeeping Biggerism!
http://www.wesnoth.org/forum/viewtopic. ... 760#131760
http://www.wesnoth.org/forum/viewtopic. ... 1358#11358
-
- Retired Developer
- Posts: 2633
- Joined: March 22nd, 2004, 11:22 pm
- Location: An Earl's Roadstead
see http://www.wesnoth.org/forum/viewtopic. ... 4940#14940
In fact:
now just do something like this in bash:
this will make copies of all the portraits with the bordered versions having .new added to their name. you could even do it in one fell swoop, but that will be left as an excercise for the reader.
In fact:
Code: Select all
#!/usr/bin/perl -w
use Image::Magick;
$filename = shift(@ARGV);
$image = new Image::Magick;
$image->Read($filename);
$width = $image->Get('width');
$height = $image->Get('height');
$nh=$height-2;
$nw=$width-2;
$Copt=$nw."x".$nh."+0+0";
$image->Mogrify('crop', $Copt);
$image->Border(geometry => '1x1' , fill => 'black');
$image->Write(filename=>$filename.".new", compress=>'None');
Code: Select all
for i in $(ls data/campaigns/*/images/portraits/*.png data/core/images/portraits/*/*.png); do echo item: $i; ./image_border.pl $i; done
- Attachments
-
- image_border.pl.gz
- (270 Bytes) Downloaded 640 times
"you can already do that with WML"
Fight Creeeping Biggerism!
http://www.wesnoth.org/forum/viewtopic. ... 760#131760
http://www.wesnoth.org/forum/viewtopic. ... 1358#11358
actually, for a lot of reasons, I'd like to see this border get applied programmatically, from within wesnoth.
These reasons include:
- changing the border for different themes (which would allow you to change the border used by all mainline units to match your campaign units); or even to use a different border for different sides.
- Adding it with ImageMagic is "yet another step" in the prep-for-game-usefulness process, and here, it requires that the person doing it have access to this resource (the border image).
- It also enforces a standard on third-party campaigns, etc, over which we have no ability to curate (without getting invasive, and editing the resources of UMCs on the campaign server). (We're assuming that in an advanced version of this, they could choose in WML to not use the standard border if they really didn't want to).
- In the future, it could be really nice to have a "display cropped section of a larger image" function - one that could display only the bust of a larger image during dialogue, but display the full version of the same image in a different dialogue.
- It would also allow us to improve the main border, and have it instantly get applied to all the current units portraits, without having to modify them.
Plus, we've clearly got the capability to do something along these lines, since it's effectively already done on our "list/tab buttons" (c.f. the left side of the options dialogue).
These reasons include:
- changing the border for different themes (which would allow you to change the border used by all mainline units to match your campaign units); or even to use a different border for different sides.
- Adding it with ImageMagic is "yet another step" in the prep-for-game-usefulness process, and here, it requires that the person doing it have access to this resource (the border image).
- It also enforces a standard on third-party campaigns, etc, over which we have no ability to curate (without getting invasive, and editing the resources of UMCs on the campaign server). (We're assuming that in an advanced version of this, they could choose in WML to not use the standard border if they really didn't want to).
- In the future, it could be really nice to have a "display cropped section of a larger image" function - one that could display only the bust of a larger image during dialogue, but display the full version of the same image in a different dialogue.
- It would also allow us to improve the main border, and have it instantly get applied to all the current units portraits, without having to modify them.
Plus, we've clearly got the capability to do something along these lines, since it's effectively already done on our "list/tab buttons" (c.f. the left side of the options dialogue).
-
- Retired Developer
- Posts: 2633
- Joined: March 22nd, 2004, 11:22 pm
- Location: An Earl's Roadstead
Well, I would like to see pretty much all these things be made into image path functions. If that was done, it would give you all the functionality that you want along with the flexibility for designers to make whatever adjustments they want.Jetryl wrote: actually, for a lot of reasons, I'd like to see this border get applied programmatically, from within wesnoth.
These reasons include:
- changing the border for different themes (which would allow you to change the border used by all mainline units to match your campaign units); or even to use a different border for different sides.
- Adding it with ImageMagic is "yet another step" in the prep-for-game-usefulness process, and here, it requires that the person doing it have access to this resource (the border image).
- It also enforces a standard on third-party campaigns, etc, over which we have no ability to curate (without getting invasive, and editing the resources of UMCs on the campaign server). (We're assuming that in an advanced version of this, they could choose in WML to not use the standard border if they really didn't want to).
- In the future, it could be really nice to have a "display cropped section of a larger image" function - one that could display only the bust of a larger image during dialogue, but display the full version of the same image in a different dialogue.
- It would also allow us to improve the main border, and have it instantly get applied to all the current units portraits, without having to modify them.
Plus, we've clearly got the capability to do something along these lines, since it's effectively already done on our "list/tab buttons" (c.f. the left side of the options dialogue).
"you can already do that with WML"
Fight Creeeping Biggerism!
http://www.wesnoth.org/forum/viewtopic. ... 760#131760
http://www.wesnoth.org/forum/viewtopic. ... 1358#11358