Image question
I want to alter an image, in terms of ahibiting ( adding ) bits of other images to it. How may I achieve this, using openGL?
http://www.lighthouse3d.com/opengl/glsl/index.php?textureMulti
That + PBO +orthogonal projection should do the trick I think.
That + PBO +orthogonal projection should do the trick I think.
thanks...but not what I'm talking about. I'm not referring to application of textures or texture manipulation.
I need to know how to actually manipulate the .bmp file. For example first i have a .bmp file with a clown's picture.
I need to know for example how to place a white rectangle on that clown image, that is directly on the image itself, outside of the openGL program, not in it.
The resulting .bmp file would be a clown image with a white rectangle covering it.
I use the free image library for image manipulation...but I can't seem to get any relevant FreeImage commands to get the job done. Maybe I'm using the wrong FreeImage calls?
Anyhow, it is important that I get his done.
I need to know how to actually manipulate the .bmp file. For example first i have a .bmp file with a clown's picture.
I need to know for example how to place a white rectangle on that clown image, that is directly on the image itself, outside of the openGL program, not in it.
The resulting .bmp file would be a clown image with a white rectangle covering it.
I use the free image library for image manipulation...but I can't seem to get any relevant FreeImage commands to get the job done. Maybe I'm using the wrong FreeImage calls?
Anyhow, it is important that I get his done.
You're looking the wrong place then. OpenGL doesn't know anything about .bmps, or any other filetype for that matter, it won't help you here.
You're correct that you can use an image library for this, or you could just do the pixel manipulation yourself, bmp is a fairly easy filetype to parse.
You're correct that you can use an image library for this, or you could just do the pixel manipulation yourself, bmp is a fairly easy filetype to parse.
you could however use opengl texture manipulation and copy the final image back to main memory and safe it to file
I'll second the idea that OpenGL is not a good choice for this. As well as not knowing about BMP files there are other potential problems, such as maximum texture size restrictions, (depending on your hardware) power-of-2 size restrictions, pipeline stalls during readback (which may make the process slower than a pure software solution!), the effects of filtering if you have it enabled, and so on that really work against it. You're better off using a good software imaging library here.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement