Page 1 of 1
Need help findng appropriate programs
Posted: 2013-03-01T14:17:47-07:00
by Zatzmanzatz
I am an editor of a mmo gaming wiki (wikidot) site. The project I am on entails geting the images and icons from the games TGA files which is also used in its UI. There are tons of images and icons to extract, I have tried looking around for something use to extract each idon into separate files to use on the wiki. So aside from taking screen shots of each one of them, does anyone have any suggestions? I have tried to use Gimp and IrfanView but the farthest I can get is determining icon/image location start and stop points and size (most are 40x40 px). Game UI's use the locations to use the icon or image within the game. I sure could use an XML based extractor or something. any help and pointers will be appreciated.
an example (imagur doesnt take tga)
Re: Need help findng appropriate programs
Posted: 2013-03-01T15:01:45-07:00
by fmw42
If the icons are all the same size, you could try using -crop in tiling mode -crop WxH +repage (without the +X+Y offsets). see
http://www.imagemagick.org/Usage/crop/#crop_tile
or a simple example at
http://www.fmwconcepts.com/imagemagick/ ... .php#crop2
If the background is made black and you trim the image to remove most of the black excess, you can also try my bash script, multicrop, at the link below, with the right grid spacing. You may lose some of the black around each icon, but if you know the size you can put it back using -border.
Re: Need help findng appropriate programs
Posted: 2013-03-01T15:19:01-07:00
by Zatzmanzatz
I never seen nor used imagemagic before today, and I really dont know where to start, I did found a standalone zip and so far its nice to look at to get confused. So point me in the right direction to get to the command line.
Oh and the preferred output is .png instead of .ico.
Looking at the cropping (1st link ) looks like a decent way to go breaking up into individual files.
On the other page,the .tga all look like mirror tiling.
I have flattened it and merged all layers so now i just need to split into 40x40
Re: Need help findng appropriate programs
Posted: 2013-03-01T19:20:56-07:00
by fmw42
This works very well.
convert fIWp1IP.png -crop 40x40 +repage icon_%02d.png
Re: Need help findng appropriate programs
Posted: 2013-03-01T19:46:12-07:00
by glennrp
fmw42 wrote:This works very well.
convert fIWp1IP.png -crop 40x40 +repage icon_%02d.png
I think that should be "icon_%03d.png" because there are more than 99 images.
Re: Need help findng appropriate programs
Posted: 2013-03-01T20:06:17-07:00
by Zatzmanzatz
after spending several hours of scouring pages I did find a solution to use with Gimp, sadly i never got know imagemagick better. thanks for your help.
Re: Need help findng appropriate programs
Posted: 2013-03-14T16:45:18-07:00
by anthony
If the image size lines up with tile size (trim is not?) You can use just count up the tiles (12x12 in this case), then use...