# How to extract \*data ptr/mem from a GLFWImage

**URL:** https://discourse.glfw.org/t/how-to-extract-data-ptr-mem-from-a-glfwimage/494
**Category:** support
**Created:** [June 19, 2009, 6:25pm UTC](https://discourse.glfw.org/t/how-to-extract-data-ptr-mem-from-a-glfwimage/494 "2009-06-19T18:25:56Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)
#### Post date: [June 19, 2009, 6:25pm UTC](https://discourse.glfw.org/t/how-to-extract-data-ptr-mem-from-a-glfwimage/494/1 "2009-06-19T18:25:56Z")

</div>

**[jigglysnot](https://sourceforge.net/u/jigglysnot/)** wrote on [Friday, June 19, 2009](https://sourceforge.net/p/glfw/discussion/247562/thread/b1ae3e60/#443f):

Hi,

GLFWImage myImage;  
glfwReadImage("pong3d\_title.tga", &myImage, GLFW\_ORIGIN\_UL\_BIT) # no flags

How do I get the raw data from a GLFWImage? ie myImage-\>data

In the API / class documentation for GLFWImage, there is no accessor for GLFWImage-\>data !!!!

Thanks,  
just a student

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)
#### Post date: [June 20, 2009, 10:38am UTC](https://discourse.glfw.org/t/how-to-extract-data-ptr-mem-from-a-glfwimage/494/2 "2009-06-20T10:38:06Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Saturday, June 20, 2009](https://sourceforge.net/p/glfw/discussion/247562/thread/b1ae3e60/#90ec):

Yes there is.

[http://glfw.sourceforge.net/GLFWReference26.pdf](http://glfw.sourceforge.net/GLFWReference26.pdf)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)
#### Post date: [June 20, 2009, 10:45am UTC](https://discourse.glfw.org/t/how-to-extract-data-ptr-mem-from-a-glfwimage/494/3 "2009-06-20T10:45:22Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Saturday, June 20, 2009](https://sourceforge.net/p/glfw/discussion/247562/thread/b1ae3e60/#d7a7):

See for instance section 3.6.1.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)
#### Post date: [June 20, 2009, 8:17pm UTC](https://discourse.glfw.org/t/how-to-extract-data-ptr-mem-from-a-glfwimage/494/4 "2009-06-20T20:17:45Z")

</div>

**[jigglysnot](https://sourceforge.net/u/jigglysnot/)** wrote on [Saturday, June 20, 2009](https://sourceforge.net/p/glfw/discussion/247562/thread/b1ae3e60/#89a5):

ahhh ok, i wasnt entirely clear: i’m using Ruby and working with the Ruby bindings/wrapper of GLFW.

I dont know how to extract the data field for the Ruby object … but I know this is beyond the scope of this forum 🙂

Thanks
