Questions tagged [tga]

TrueVision TGA (or Targa) is a raster image file format with a long history of use in computer games, primarily because it was the first generally available format supporting 24-bit images.

See the following for more information:

74 questions
0
votes
1 answer

libtga weird Segmentation fault

I didn't want to reinvent the wheel, so I downloaded libtga which seemed to have a convenient and simple API. Building was easy, but I stumbled upon a weird segmentation fault I can not explain. A small example: #include #include…
the_summer
  • 439
  • 3
  • 10
0
votes
0 answers

TGA RLE compressing ( writing ) algorithm on c++

I found this code and I wonder why it does't works .. // f is an stream void writeTGA(ostream& f, bool rle) const{ f<
Pépito
  • 57
  • 4
  • 11
0
votes
1 answer

Problems converting tga files to black and white

I have been trying to make this program to convert a tga image for color into black and white. But i have no clue how to go about it. I am verry new to C and have yet to get the hang of the syntax and even proper usage of ubuntu. I think my problem…
0
votes
0 answers

Flipping image (.tga) horizontaly and verticaly using C

I have an assigment in C, where i have too flip a .tga image horizontaly and verticaly by doing changes to the header. I am guessing i have to do something to the height and width of the picture, but not sure what to do. Here is a link about the TGA…
0
votes
1 answer

Read .tga with DirectX 11

Since a few days im working on a tool where i need to draw textures on several file format with directX 11. After googling a lot, i didnt found how to do. I'm using D3DX11CreateShaderResourceViewFromFile for load .dds and .png files, but i read…
Aulaulz
  • 459
  • 4
  • 15
0
votes
1 answer

Converting JPEG and other types to TGA

I am trying to create a mass image converter for common image types. I was able to find a TGA reader and I can convert TGA to image types supported by .NET library. However, there is no converter of "something" to TGA in .NET except the external dll…
gunakkoc
  • 1,069
  • 11
  • 30
0
votes
1 answer

Creating a TGA using CGImageDestinationCreateWithData

I'm trying to save a TGA image. I've got the data as a CGImageRef and used CFDataCreateMutable to get the CFMutableDataRef, but I'm not sure what type argument with which to call CGImageDestinationCreateWithData. Looking at the UTType reference,…
benwad
  • 6,414
  • 10
  • 59
  • 93
0
votes
1 answer

reading TGA files in OpenGl to create a 3d ouse

I have a TGA file and a library that allready has everything that I need to read TGA and use them. This class has a method called pixels(), that returns a pointer that is pointed to the memory area where pixel are stored as RGBRGBRGB... My question…
0
votes
1 answer

Do FrontBuffer have alpha value?

I was trying to save a .tga image using GetFrontBufferData method,but alpha value is lost.They are totally one.I could get right alpha value from RenderTarget or BackBuffer,but not rgb value is not correct.Even the scene present to show…
April
  • 11
  • 3
0
votes
2 answers

Android NDK Pointer Arithmetic

I am trying to load a TGA file in Android NDK. I open the file using AssetManager, read in the entire contents of the TGA file into a memory buffer, and then I try to extract the pixel data from it. I can read the TGA header part of the file…
Nitzan Wilnai
  • 923
  • 9
  • 24
-1
votes
1 answer

Why is my TGA file opening as numerical code instead of showing my image?

I am working on a personal project using C++, and I am trying to write to a TGA file. I have no issues reading/opening the input file, but when I open the output file that I generate this is a snippet of what it displays: TGA displaying hex code I…
Amy
  • 1
  • 1
-1
votes
1 answer

Java - How to convert png/jpeg to tga/targa?

I would like to convert a png image to a tga image with Java. I was looking around the internet but sadly didn't find any Java code examaples. Does anyone have code to do this conversion? Edit: As this is not a code sharing service: Can anyone…
Legatio
  • 259
  • 3
  • 9
-1
votes
1 answer

Writing a tga file

I don't understand, when we writing a tga header, why are we doing something like that to put the dimensions of the picture : header[12] =(width & 255); header[13] =(width>>8 ); Thanks in advance
Pépito
  • 57
  • 4
  • 11
-2
votes
1 answer

Why does not read the whole text file?

In C#, I would like to read a .tga picture into a string variable. I use many of variations to read from a text file, but there is a problem with every solution. The file size 17Kb Why doesn't read the whole text? For example this does not…
Szilvia Lázár
  • 111
  • 1
  • 8
1 2 3 4
5