Ticket #67 (closed defect: fixed)

Opened 10 months ago

Last modified 10 months ago

add support for writing images into StringIO directly

Reported by: artem Owned by: artemp
Priority: Milestone: 0.5.0
Component: Boost.Python Binding Version: SVN Trunk
Severity: Normal Keywords: String
Cc: Patch Needs Improvement:
Needs Docmentation: Has Patch?:
Design Decision Needed:

Description


Change History

Changed 10 months ago by artem

  • keywords String added; StringIO removed
  • status changed from new to closed
  • resolution set to fixed

Support for writing images into Python String object :

>>> from mapnik import * 
>>> im = Image(500,500)
>>> im.background=Color('green')
>>> im.tostring() # save raw data
>>> im.tostring('png') # save PNG encoded

simplified saving functions, now class methods

>>> im.save('test.jpg')
>>> im.save('test.png','png256')
Note: See TracTickets for help on using tickets.