Jump to content

  • Log In with Google      Sign In   
  • Create Account

iac249

Member Since 27 Dec 2009
Offline Last Active Today, 12:53 AM

Posts I've Made

In Topic: Manipulating image files by batch

08 November 2014 - 02:46 PM

 

ImageMagick is what I've used for bulk scaling, cropping, format conversions, and others as well.

 

Command for converting BMP files to GIF files:
//Warning: Make sure you set your command-line's current directory to the directory (and sub-directories) you want to crawl before executing this command.
//Note: It won't delete the original BMP files, so you need to do that afterward - easy enough to do in Windows Explorer by searching for *.bmp and selecting all).
for /r %i in (*.bmp) do mogrify -format gif -transparent #FF0000 "%i"

Replace '#FF0000' with your actual background color. Make sure you have your current directory set - you don't want to crawl over your entire computer!

 

This is Windows command line command saying to recursively crawl the current directory, filtering by *.bmp and executing the command that follows, replacing %i with the filepath and filename.

for /r %i in (*.bmp) do

This is an ImageMagick command saying to change the file "%i" into a gif, and make "#FF000000" the transparent part of the gif.

mogrify -format gif -transparent #FF0000 "%i"

 

This easily saved me a hundred hours of manual work!


In Topic: I Need Help Starting Out? I'm a Programmer But Not A 2D Artist?

02 November 2014 - 02:40 AM

Lately I've been using Construct 2.

 

The problem is, is that I cannot make my own sprites and tilesets. I suck at art. And I have no clue how individual programmers make small, basic games without an artist's help!? What do you guys do? How can I get at least good looking 2D art as sprites and tilesets?

Scirra has an asset store from which you can purchase game art; also check out the asset store at the unity3d site.


In Topic: Manipulating image files by batch

02 November 2014 - 02:38 AM

 

ImageMagick is what I've used for bulk scaling, cropping, format conversions, and others as well.

 

Command for converting BMP files to GIF files:
//Warning: Make sure you set your command-line's current directory to the directory (and sub-directories) you want to crawl before executing this command.
//Note: It won't delete the original BMP files, so you need to do that afterward - easy enough to do in Windows Explorer by searching for *.bmp and selecting all).
for /r %i in (*.bmp) do mogrify -format gif -transparent #FF0000 "%i"

Replace '#FF0000' with your actual background color. Make sure you have your current directory set - you don't want to crawl over your entire computer!

 

This is Windows command line command saying to recursively crawl the current directory, filtering by *.bmp and executing the command that follows, replacing %i with the filepath and filename.

for /r %i in (*.bmp) do

This is an ImageMagick command saying to change the file "%i" into a gif, and make "#FF000000" the transparent part of the gif.

mogrify -format gif -transparent #FF0000 "%i"

 

Thanks!


In Topic: Manipulating image files by batch

29 October 2014 - 11:11 AM

Removing a solid background often doesn't work very well, leaving "dirty" pixels around the edge of the image, or accidentally cutting holes in the image if there is anything the same color as the background.  So be sure you examine the images after the batch conversion.

That's an excellent point, and after some experimentation, I find it leaves some jagged edges around the sprite. Probably not an issue at low res, but maybe something I'll need to address anyway. This is what happens when a programmer tries to take up graphic arts. smile.png


In Topic: Manipulating image files by batch

27 October 2014 - 10:26 PM

This gives me some good info to work with. Thanks!


PARTNERS