Frame data #1
-
Hi there, Thank for sharing this easy implementation of giflib. Assuming that pixelBuffer represent the data buffer in every frame, is it somehow possible to get the size of that buffer so I could load a particular frame from a gif as a normal image? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 15 replies
-
I'm not sure I understand the question. You can load a frame as an image by copying its pixels from |
Beta Was this translation helpful? Give feedback.
-
Thank you for the answer! What i'm trying to do is to create a directx texture (D3DX9) using the first frame from the gif. Here's a sample of the code
Where the create function returns failed with the following output 3.gif: failed to create texture with error: D3DXERR_INVALIDDATA Invalid data |
Beta Was this translation helpful? Give feedback.
I'm not sure I understand the question. You can load a frame as an image by copying its pixels from
EasyGifReader::Frame::pixels()
. You need to copy exactly4*width()*height()
bytes (4 bytes per pixel), which should be the size of the buffer you asked about?