Skip to content

devprofile98/targa-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

targa-rs

library to work with TARGA [.tga] format in rust

Create a .tga image

    let mut image  = TargaImage::new(500, 500);
    // or load the image
    if let Ok(image) = TargaImage::load("path_to_image.tga") {
        .....
    }

Change pixel values

    image.set_pixel(200, 300, &color);
    image[6000] = color.clone();

Write it

    match image.save_file("shapes.tga"){
        Ok(size) => println!("number of Bytes written succesfully are : {}", size),
        Err(e) => println!("Failed to save image {:?}", e)
    }

About

Targa ( .tga) image format in rust

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages