<br><div class="gmail_quote">My apologies! I worte the email while doing 3 other things. <br><br>I haven't really tried anything to access this struct other than trying to find different elements with ctypes.c_int.in_dll(dll, 'symbol') and access the elements in the same way I do in C. I didn't think either of these would work but hoped I would get some type of return that would give me a little more info.<br>

<br>I have been using a cli to access the library from python and would just send the image data via stdin and the parameters of the struct as command line args. From C the struct is easily accessible through the class instance (libraw::imgdata) and I tried similar variations with ctypes but just get 'function not found'. Makes sense though. <br>

<br>this works:<br><br>lr = ctypes.cdll.LoadLibrary(libraw)<br><br>handle = lr.libraw_init(0)<br><br>lr.libraw_open_buffer(handle, buf, len(buf)) # buf is an image read by python<br>lr.libraw_unpack(handle, buf, len(buf))<br>

<br># imgdata attampt. returns  "function 'imgdata' not found"<br>
#lr.imgdata.params.bright(2) <br><br>lr.libraw_dcraw_process(handle)<br>lr.libraw_dcraw_ppm_tiff_writer(handle,'test.ppm')<br>lr.libraw_close(handle)<br><br><br><br>These are the 'exposed' functions, if that is the right term, and will produce an rgb image. There are a few other functions but they are not important atm. <br>

<br>I know I don't know what I'm doing with this but it will be worth it if I can struggle through. Is there a way I can access this struct via python? Alternatively I could also write a new function in libraw that can access this struct and be exposed to ctypes.<br>
<font color="#888888">
<br>jt</font><div><div></div><div class="h5"><br><br><br><div class="gmail_quote">On Thu, Sep 23, 2010 at 12:28 AM, Simon Brunning <span dir="ltr"><<a href="mailto:simon@brunningonline.net" target="_blank">simon@brunningonline.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>On 22 September 2010 21:13, jay thompson <<a href="mailto:jayryan.thompson@gmail.com" target="_blank">jayryan.thompson@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> I posted in regard to this in the past but it didn't go very far, no ones<br>
> fault, but I'm again atempting to make this work and could use some help.<br>
><br>
> I would like to use libraw.dll (<a href="http://www.libraw.org/" target="_blank">http://www.libraw.org/</a>  version 0.10) from<br>
> python and can access all the functions fine and produce images but there is<br>
> a structure that holds all the process settings that I cannot access with<br>
> ctypes. I'm sure it's because I'm going about it the wrong way. I was<br>
> wondering if there was anyone in this list with experience with this sort of<br>
> thing that could point me in the right direction.<br>
<br>
</div>A good start would be to tell us what you've tried, and what goes<br>
wrong when you try it.<br>
<font color="#888888"><br>
--<br>
Cheers,<br>
Simon B.<br>
</font></blockquote></div><br><br clear="all"><br></div></div><div><div></div><div class="h5">-- <br>"It's quite difficult to remind people that all this stuff was here for a million years before people. So the idea that we are required to manage it is ridiculous. What we are having to manage is us."   ...Bill Ballantine, marine biologist.<br>

<br>
</div></div></div><br><br clear="all"><br>-- <br>"It's quite difficult to remind people that all this stuff was here for a million years before people. So the idea that we are required to manage it is ridiculous. What we are having to manage is us."   ...Bill Ballantine, marine biologist.<br>
<br>