Accessing a single R,G or B pixel row in ReadStream callback
Posted: 2011-02-12T01:34:28-07:00
Hi,
I am trying to stream a very large image .For this I use the ReadStream method and in the callback I write:-
pp here i believe is the pointer to the whole structure(r/g and b).I need this to be copied to the CUDA device which is why i need the RG and B arrays separately ..Is there a way to do this?
Thanks a lot!
I am trying to stream a very large image .For this I use the ReadStream method and in the callback I write:-
Code: Select all
static size_t Callback( const Image *image,const void *pixels,
const size_t columns)
{
ExceptionInfo* exception;
const PixelPacket *pp;
if(numbers<image->rows)
{
pp=AcquireImagePixels(image,0,numbers,image->columns,1,exception);
}
numbers++;
return(columns);
}
Thanks a lot!