I am developing cocos2d game. Where I am trying to create CCLabelBMFont. In resource I have .fnt file and .tga file. Is it possible to make CCLabelBMFont with .fnt file and .tga (instead of png)
No.
You can only use PNG, JPG or PVR image files. Just about any image program will be able to convert an image from TGA to PNG in a second.
Related
In OpenGL you could read a BMP file and use it as texture.
I know how to read a BMP file in OPENGL.
I just want to know if is it the same thing with JPG or JPEG files? is OpenGL support those files?
OpenGL does not support BMP files. It just cares about raw image date as one-, two or threedimensional arrays of pixel data with up to 4 channels (and a set of different data types). OpenGL does not even know what a file is. And it can't load anything. If you need JPEG files, you have to load them via other means, like libjpeg or some higher level image loading libraries or some of the other image loading libraries.
How can I "draw"\"merge" a png top of another png (background) using libpng, while keeping the alpha section of the png being drawn on top of the backhround png. There does not seem to be any tutorials or anything mentioned in the documentation about it.
libpng is a library for loading images stored in the PNG file format. It is not a library for blitting images, compositing images, or anything of that nature. libpng's basic job is to take a file or memory image and turn it into an array of color values. What you're talking about is very much out of scope for libpng.
If you want to do this, you will have to do the image composition yourself manually. Or use a library that can do image composition (cairo, etc).
I'm having a few issues regarding how to render a PVR.
I'm confused about how to get the data from the PVR to screen. I have a window that is ready to draw a picture and I'm a bit stuck. What do I need to get from the PVR as parameters to then be able to draw a texture? With jpeg and pngs locally you can just load the image from a directory but how would the same occur for a PVR?
Depends what format the data inside the PVR is in. If it's a supported standard then just copy it to a texture with glTexSubImage2D(), otherwise you will need to decompress it into something OpenGL understands - like RGB or RGBA.
edit - OpenGL is a display library (well much much more than that), it doesn't read images, decode movies or do sound.
TGA files are generally very simple uncompressed RGB or RGBA image data, it should be trivial to decode the file, extract the image data and copy it directly to an opengl texture.
since you tagged the question Qt you can use QImage to load the tga and Using QImage with OpenGL
I need to open 16 bpp grayscale tiff image in C++ program. Trying to do this with GDI+ Image class, I get OutOfMemoryException (GDI+ doesn't support 16 bpp format). Standard Windows tools, like Paint and Picture Viewer, cannot open such image, possibly they use GDI or GDI+. ImageJ program opens such image successfully.
Is there some SDK which can open such images and give access to image raw data? If not, I need TIFF file specification, and implement this in my own code.
Use LibTIFF.
I want to do a texture mapping to a PPM file in C++. Is there some way I can load the PPM file. Thanks.
PPM is a trivial image file format to read; it's well documented here.
A few lines of C++ are all you need: example.