Hi Mark, I found a bug of this servlet. One instance of this servlet can not handle different kind of image size. By using ?structure=Cc1cc(O)no1&export=format:png,width:100,height:100, I got a normal image. But If I use ?structure=Cc1cc(O)no1&export=format:png,width:150,height:150 on the same servlet to get a bigger picture, I got a broken image(see attachment broken.png). Maybe you forget to set the background color to white again when image size changes. Hope you can fix it.
Best Regards, Duan 2008/6/12 Mark Southern <[EMAIL PROTECTED]>: > Dear all, > > I've been playing around with some image/file generation from CDK, > starting with examples from Rajarshi's site. > > Highlights: > - There is an ExportFormat class to adjust the properties of the > Renderer2DModel class via a name/value pair string. The names closely > correspond to the methods of the Renderer2DModel class. Pairs are > separated by ',' and delimited by ':' so they can easily be used in a > Url. > - You can highlight a portion of the molecule. > - You can use ExportFormatHandler instances to register lots of > different image types. Implemented are those from javax.imageio (jpeg, > png, bmp, wbmp, gif) and org.freehep.vectorgrahics (emf, pdf, svg, swf, > ps), and also structure file based export for Molfiles and Smiles (mol > and smi). > - There is a Servlet example that you can GET/POST to. Examples below. > - LGPL'd Code is available as a maven based eclipse project: > http://chemutils.florida.scripps.edu:8080/cdkexporter/cdkexporter.zip > > I hope you find this interesting. > > Best regards, > > ~Mark. > > > Examples: > > A png image, with width and height specified > http://chemutils.florida.scripps.edu:8080/cdkexporter?structure=N1([CH]( > C(N[CH](C1=O)CCCC)=O)Cc1cc(c(cc1)O)O)C[CH]([CH](C(O)=O)Br)Br&highlight=C > 1=CC=CC=C1&export=format:png,width:350,height:350 > > A Molfile: > http://chemutils.florida.scripps.edu:8080/cdkexporter?structure=N1([CH]( > C(N[CH](C1=O)CCCC)=O)Cc1cc(c(cc1)O)O)C[CH]([CH](C(O)=O)Br)Br&export=form > at:mol > > An Extended MetaFile > http://chemutils.florida.scripps.edu:8080/cdkexporter?structure=N1([CH]( > C(N[CH](C1=O)CCCC)=O)Cc1cc(c(cc1)O)O)C[CH]([CH](C(O)=O)Br)Br&highlight=C > 1=CC=CC=C1&export=format:emf,width:350,height:350,BondWidth:2.5 > > A PubChem CID: > http://chemutils.florida.scripps.edu:8080/cdkexporter?id=123456&type=cid > > A PubChem SID: > http://chemutils.florida.scripps.edu:8080/cdkexporter?id=123456&type=sid > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Cdk-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/cdk-user >
<<attachment: broken.png>>
------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________ Cdk-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cdk-user

