Skip to content

Commit

Permalink
Final Commit For First Release!
Browse files Browse the repository at this point in the history
  • Loading branch information
xNWP committed Jul 6, 2019
1 parent 38afa34 commit 4778de9
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 9 deletions.
40 changes: 36 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,36 @@
# xTGA Targa Library
> Currently a work in progress, check back soon!
[![Build Status](https://travis-ci.com/xNWP/xTGA.svg?branch=master)](https://travis-ci.com/xNWP/xTGA)
[![License](http://img.shields.io/:license-mit-blue.svg)](https://opensource.org/licenses/MIT)
<div style="text-align:center"><img src="https://raw.githubusercontent.com/xNWP/xTGA/wiki-files/images/logo.png" /></div>

xTGA Targa Library
==================
> xTGA is a C++ (C-Interface Available) Library for opening, creating, and manipulating TrueVision TGA formatted files.
[<img src="https://travis-ci.com/xNWP/xTGA.svg?branch=master"></img>](https://travis-ci.com/xNWP/xTGA)
[<img src="http://img.shields.io/:license-mit-blue.svg"></img>](https://opensource.org/licenses/MIT)

## what can it do? ##
- Extract RGBA images from a TGA file.
- Access embedded information such as file author, file comments, creation dates, and more!
- Create TGA images from thin air! *(note: actually requires a source image)*
- Edit extension information such as author, comments, job times, etc.
- Embed arbitrary information into a TGA file via developer entries.
- Read thumbnail images as well as generate them with bicubic interpolation.
- Basically everything you'd ever want to do with a TGA image (hopefully).

## what can't it do? ##
- give you up
- let you down
- turn around
- hurt you (todo: confirm this)

## looks great! how do I get started? ##
I'm glad you asked disembodied voice in my head. You can start by checking out one of our fabulous guides below (we worked really hard on them). If after reading all relevant information you are still confused about getting the library working for you, don't hesitate to open an issue on our [GitHub](https://github.com/xNWP/xTGA/issues) or contact me directly via [Twitter](https://twitter.com/ThatNWP).

- [Compiling The Code](https://github.com/xNWP/xTGA/wiki/Compiling-The-Code)
- [Linking The Library](https://github.com/xNWP/xTGA/wiki/Linking-To-The-Library)
- [Opening An Image](https://github.com/xNWP/xTGA/wiki/Opening-An-Image)
- [Saving An Image](https://github.com/xNWP/xTGA/wiki/Saving-An-Image)

## some useful links ##
- [xTGA Documentation](http://thatnwp.com/xTGA/docs)
- [TGA Specification](http://tfc.duke.free.fr/coding/tga_specs.pdf)
- [TGA Wiki](https://en.wikipedia.org/wiki/Truevision_TGA)
7 changes: 3 additions & 4 deletions xTGA/src/codecs.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//============ Copyright © 2019 Brett Anthony. All rights reserved. ============
//============ Copyright 2019 Brett Anthony. All rights reserved. ============
///
/// This work is licensed under the terms of the MIT license.
/// For a copy, see <https://opensource.org/licenses/MIT>.
Expand Down Expand Up @@ -148,14 +148,13 @@ namespace xtga
/// @return bool True if the color map could be generated.
//----------------------------------------------------------------------------------------------------
bool GenerateColorMap(const void* inBuff, void*& outBuff, void*& colorBuff, addressable length, uchar depth, uint16& Size, bool force = false, ERRORCODE* error = nullptr);

//----------------------------------------------------------------------------------------------------
/// Applies a colormap to an existing image buffer.
/// @param[in] buff The input image buffer.
/// @param[in] ilength The length of the input buffer (in pixels).
/// @param[in] colormap The input color map.
/// @param[in] clength The length of the colormap buffer (in pixels).
/// @param[in] length The number of pixels the input buffer contains.
/// @param[in] depth The bits per pixel of the input image (must be 16/24/32).
/// @param[out] error Holds the error/status code (can be nullptr).
/// @return void* The converted image buffer.
Expand Down Expand Up @@ -191,4 +190,4 @@ namespace xtga
}
}

#endif // !XTGA_CODECS_H__
#endif // !XTGA_CODECS_H__
2 changes: 1 addition & 1 deletion xTGA/src/tga_file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ xtga::TGAFile::__TGAFileImpl::__TGAFileImpl(char const * filename, ERRORCODE* er
XTGA_SETERROR(error, ERRORCODE::NONE);
}

xtga::TGAFile::__TGAFileImpl::__TGAFileImpl(const void* buffer, uint16 width, uint16 height, const Parameters& config, ERRORCODE* error)
xtga::TGAFile::__TGAFileImpl::__TGAFileImpl(const void* buffer, uint16 width, uint16 height, const Parameters& config, ERRORCODE* error) : __TGAFileImpl ()
{
using namespace pixelformats;

Expand Down

0 comments on commit 4778de9

Please sign in to comment.