| mekkatorqu (226) | |
| is it possible? no conversions, normally load TGA image just like bitmap, I searched on google but found nothing except GDI+ but there's nothing about TGA | |
|
|
|
| webJose (2947) | |
|
Google result #1 when searching for "C++ load targa": http://steinsoft.net/index.php?site=Programming/Code%20Snippets/Cpp/no8 Looks like basic code to load the TGA. It is C, though, not C++. | |
|
Last edited on
|
|
| mekkatorqu (226) | |
| thanks, gonna try it, and from what I see the code looks just like any of mine O_o | |
|
|
|
| mekkatorqu (226) | |
| well, how do I display it? do I need to create custom control since picture control is supporting only bitmap, icon and arrow or something like that | |
|
|
|
| webJose (2947) | |
| I wouldn't know. I imagine the actual raw color data needs translation to a bitmap, but I have never worked heavily with graphics. Best if you just look up a graphics library that is already-made and ready to go. I think Google result #7 or so was a C library for targa. | |
|
|
|
| mekkatorqu (226) | |
| I've found one by angelcode for saving/loading TGA, but I can't find any function to display it :/ only some functions for conversion, gonna try it | |
|
|
|
| Moschops (5959) | |||
This is how I loaded and displayed a tga file using CImg:
Converting it to some other format would be simple enough. | |||
|
|
|||
| mekkatorqu (226) | |||
can u give me some example on how to display it in window using picture control? just like bitmap
| |||
|
|
|||
| modoran (1101) | |
|
This is a very small library that can load .tga images and gives you a HBITMAP handle (this is what you need). It consists of only 2 files which you add to your project: http://www.dhpoware.com/source/bitmap.html It uses GDI+ internally. | |
|
|
|