Up - any news on this item?

I went into the source code of PIL.Image and figured out that
Image.tobytes() doesn't simply return a pointer but builds the buffer
on the fly.
So I wonder if using PIL directly as a hostbuf is possible at all
(without doing horrible hacks on undocumented implementation details)?

Thanks
 G.

On 14 May 2014 16:30, CRV§ADER//KY <[email protected]> wrote:
> Hi Andreas,
>     sorry to pester - any news on this?
>
>
> On 14 April 2014 08:25, CRV§ADER//KY <[email protected]> wrote:
>>
>> import pyopencl as cl
>> from PIL import Image
>>
>> src = Image.open("test.jpg").convert('RGBA')
>>
>> ctx = cl.create_some_context()
>> fmt = cl.ImageFormat(cl.channel_order.RGBA, cl.channel_type.UNORM_INT8)
>>
>> src_buf = cl.Image(ctx,
>>     flags=cl.mem_flags.READ_ONLY | cl.mem_flags.USE_HOST_PTR,
>>     format=fmt,
>>     shape=src.size,
>>     hostbuf=src
>> )
>>
>>
>>
>> On 14 April 2014 07:34, CRV§ADER//KY <[email protected]> wrote:
>>>
>>> It is in one of the messages above already
>>>
>>> On 14 Apr 2014 01:55, "Andreas Kloeckner" <[email protected]>
>>> wrote:
>>>>
>>>> "CRV§ADER//KY" <[email protected]> writes:
>>>> > sorry for the long wait.
>>>> > ...nope, still doesn't work; same error as before.
>>>>
>>>> Can you send some self-contained code to reproduce this? That would help
>>>> me get this working.
>>>>
>>>> Andreas
>>
>>
>

_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl

Reply via email to