Hi Uwe,

thanks for your answer. Good to know that the problem is specific to
the version of the PIL library in use.

On Sat, Aug 7, 2010 at 12:11 AM, Uwe Hoffmann <[email protected]> wrote:
> [...].  As a temporary workaround you can try :
>
> from rdkit.Chem.AllChem import MolFromSmiles, Compute2DCoords
> from rdkit.Chem.Draw import MolToFile
> molecule = MolFromSmiles('c1ccccc1')
> Compute2DCoords(molecule)
> MolToFile(molecule,'img.png', size=(250, 250),  #img.pdf,img.svg,img.ps
>          kekulize=True, wedgeBonds=True,
>          highlightAtoms=[])
>
>
> In this case you circumvent PIL (and agg) completely.

thanks, I will try this.

>
> The functionality of MolToFile should be folded into MolToImageFile.
> The problem with MolToImage is still open in this case.

After some reading of the PIL documentation I was wondering if
splitting the image into bands, swapping the two colors "manually" and
merging the bands back into a single image could represent a decent
workaround when the PIL version is <= 1.1.6. Do you think it would be
critically inefficient?

Regards,
Riccardo

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to