[python-win32] How to convert an OLE image from ODBC?

Steven James steven.james at gmail.com
Fri May 11 13:52:11 CEST 2007


Can you post one of those tempfiles somewhere?

On 5/11/07, Grzegorz Adam Hankiewicz <ghankiewicz at rastertech.es> wrote:
>
> Steven James wrote:
> > Have you tried writing the binary data to a file, then reading it from
> > that file with PIL?
> >
> > Also, you could try Image.frombuffer() if you can coerce the binary
> > data into a python string. I just finished a win32 project that read
> > thumbnails from COM using IExtractImage and the data came in with
> > B,G,R byte order instead of R,G,B, so that took some finagling as well.
> I dump the data to a temporary file and no matter how I rename the
> extension GIMP can't handle it. Opening the file with Vim shows the
> following header string: "Imagen de mapa de bits...Paint.Picture".
>
> --
> Rastertech España S.A.
>         Grzegorz Adam Hankiewicz
> /Jefe de Producto TeraVial/
>
> C/ Perfumería 21. Nave I. Polígono industrial La Mina
> 28770 Colmenar Viejo. Madrid (España)
> Tel. +34 918 467 390 (Ext.17)     *·*           Fax +34 918 457 889
> ghankiewicz at rastertech.es         *·*           www.rastertech.es
> <http://www.rastertech.es/>
>
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20070511/8024de44/attachment.htm 


More information about the Python-win32 mailing list