Re: [Matplotlib-users] metadata of png-files
The PNG writer in matplotlib doesn't support writing of extended metadata. However, it may be less useful anyway, as while you can put arbitrary key/value pairs in a PNG file, I don't believe there's any standards for what the keys should be, so there aren't many tools that use it. (If I'm just not able to find it, point it out to me...) By contrast, many of the metadata fields in PDF are standardized so content management systems etc. do take advantage of them. Mike Marius Jan Klein wrote: > Thanks for your help concerning the pdf files! It was exactly what I was > looking for. Is there anything similar for png-files? > > > > >> Marius Jan Klein writes: >> >> >>> I want to edit the metadata of pdf- or png-files when creating one of >>> these files. I do not want to use for example Pypdf because then >>> Python must read the file first before it can be edited. >>> > > > > >> Jouni K. Seppänen writes: >> >> Now there is (in the trunk, revision 7964), via the PdfPages mechanism: >> >> >from matplotlib.backends.backend_pdf import PdfPages >> >from pylab import * >> >>> pdf = PdfPages('testing.pdf') >>> plot([3,1,4]) >>> pdf.savefig() >>> d = pdf.infodict() >>> d['Title'] = 'Testing' >>> d['Author'] = u'Jouni K. Sepp\xe4nen' >>> pdf.close() >>> > > -- > Join us December 9, 2009 for the Red Hat Virtual Experience, > a free event focused on virtualization and cloud computing. > Attend in-depth sessions from your desk. Your couch. Anywhere. > http://p.sf.net/sfu/redhat-sfdev2dev > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] metadata of png-files
Thanks for your help concerning the pdf files! It was exactly what I was looking for. Is there anything similar for png-files? > Marius Jan Klein writes: > >> I want to edit the metadata of pdf- or png-files when creating one of >> these files. I do not want to use for example Pypdf because then >> Python must read the file first before it can be edited. >Jouni K. Seppänen writes: > >Now there is (in the trunk, revision 7964), via the PdfPages mechanism: > >>from matplotlib.backends.backend_pdf import PdfPages >>from pylab import * >>pdf = PdfPages('testing.pdf') >>plot([3,1,4]) >>pdf.savefig() >>d = pdf.infodict() >>d['Title'] = 'Testing' >>d['Author'] = u'Jouni K. Sepp\xe4nen' >>pdf.close() > -- Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] metadata
> Marius Jan Klein writes: > >> I want to edit the metadata of pdf- or png-files when creating one of >> these files. I do not want to use for example Pypdf because then >> Python must read the file first before it can be edited. > > Concerning pdf files, there is no current support for that, >Jouni K. Seppänen writes: > >Now there is (in the trunk, revision 7964), via the PdfPages mechanism: > >>from matplotlib.backends.backend_pdf import PdfPages >>from pylab import * >>pdf = PdfPages('testing.pdf') >>plot([3,1,4]) >>pdf.savefig() >>d = pdf.infodict() >>d['Title'] = 'Testing' >>d['Author'] = u'Jouni K. Sepp\xe4nen' >>pdf.close() > Thanks for your help concerning the pdf files! It was exactly what I was looking for. Is there anything similar for png-files? -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] metadata
I have to do a lot of plots. I would like to put an identifier into each plot that identifies the way the plot was made. This identifier then could point to a database that contains the script and extra information. Here is an example: http://depth-first.com/articles/2007/08/08/never-draw-the-same-molecule-twice-viewing-image-metadata The interface would be: fig.savefig("example.pdf",{"creator": "2009-11-13"}) -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] metadata
Jouni K. Seppänen writes: > Marius Jan Klein writes: > >> I want to edit the metadata of pdf- or png-files when creating one of >> these files. I do not want to use for example Pypdf because then >> Python must read the file first before it can be edited. > > Concerning pdf files, there is no current support for that, Now there is (in the trunk, revision 7964), via the PdfPages mechanism: from matplotlib.backends.backend_pdf import PdfPages from pylab import * pdf = PdfPages('testing.pdf') plot([3,1,4]) pdf.savefig() d = pdf.infodict() d['Title'] = 'Testing' d['Author'] = u'Jouni K. Sepp\xe4nen' pdf.close() -- Jouni K. Seppänen http://www.iki.fi/jks -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] metadata
Marius Jan Klein writes: > I want to edit the metadata of pdf- or png-files when creating one of > these files. I do not want to use for example Pypdf because then > Python must read the file first before it can be edited. Concerning pdf files, there is no current support for that, but at least the simplest form of metadata could be supported pretty easily (the document information dictionary - title, author, subject, keywords, creator, producer, creation date, modification date). What sort of API do you have in mind? -- Jouni K. Seppänen http://www.iki.fi/jks -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] metadata
Hi everyone, I want to edit the metadata of pdf- or png-files when creating one of these files. I do not want to use for example Pypdf because then Python must read the file first before it can be edited. Does anyone know how to deal with that? -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users