Results 1 to 5 of 5

Thread: "Hide" Colour in CL_Sprite?

  1. #1

    Default "Hide" Colour in CL_Sprite?

    Hi all (or hi Rombust ),

    i have this picture.

    And I want to put it into a CL_Sprite.
    Is there any way of removing the brown colour around it?

    Thanx

  2. #2
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    Open the image in a paint application (such as Photoshop or GIMP). Select the brown color and replace it with transparent. Then save your picture again.

  3. #3

    Default

    mhm, that would take hours, cause there are so many pics...
    Is there any way of autmating this?

  4. #4
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    I hear Acdsee can automate this.

  5. #5

    Default

    I found a much better solution : imagemagick
    I made a little perl Script:
    PHP Code:
    #!/usr/bin/perl
    use strict;
    my $prefix "bmp";
    my $output "png";
    my $colour "#694a2e";
    my $dir "/home/finn/imgs" 
    my $file;

    my @files glob("*.$prefix");
    chdir($dir);
    mkdir("converted"0755);
    foreach 
    $file (@files)
    {
        for(
    1..4) { chop($file); }
        
    system("convert -transparent \"$colour\"".         
            
    " \"$file.$prefix\" \"converted/$file.$output\"");


Similar Threads

  1. Pilgrimís Quest: Problem in "Welcome to Fire woods!"
    By Floater in forum Dink Smallwood HD
    Replies: 0
    Last Post: 08-18-2009, 06:07 PM
  2. Vista: "game.exe has stopped working"
    By Pleng in forum Novashell Game Creation System
    Replies: 5
    Last Post: 02-15-2009, 02:09 AM
  3. Multiple "keydown" signals on a single keystroke
    By zag in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 10-19-2008, 11:04 PM
  4. Coppying "skeleton" wont work (MAC)
    By Suudsu2200 in forum Novashell Game Creation System
    Replies: 1
    Last Post: 03-04-2007, 08:24 PM
  5. Di-Mart Guns -Explanation of the "Store Guy" event
    By rmcnew in forum Funeral Quest
    Replies: 2
    Last Post: 01-15-2004, 06:25 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •