1. Hideo Hattori
  2. pgmagick
  3. Issues
Issue #24 resolved

.writeImages() doesn't write to blob

mlehmann
created an issue

{{{

!/usr/bin/env python

import pgmagick

im = pgmagick.Image('existing.tif')

pdf = pgmagick.ImageList() pdf.append(im) pdf.append(im) pdf.writeImages('new.pdf')

blob = pgmagick.Blob() pdf.writeImages(blob) }}}

pdf.writeImages('new.pdf') works fine, but as I want to operate on the fly / in-memory without doing something on the filesystem (not even in the /tmp folder), I want to write the pdf to a blob. But writing to blob pdf.writeImages(blob) does not work:

{{{ Traceback (most recent call last): File "./graphicsmagick.py", line 26, in <module> pdf.writeImages(blob) Boost.Python.ArgumentError: Python argument types in ImageList.writeImages(ImageList, Blob) did not match C++ signature: writeImages(_ImageList {lvalue}, std::string) }}}

Comments (2)

  1. mlehmann reporter

    Similar to issue #25 ("ImageList.readImages() should support blobs") I checked the sources and

    GraphicsMagick-1.3.15/Magick++/lib/Magick++/STL.h

    not only contains

    void writeImages( InputIterator first_, InputIterator last_, const std::string &imageSpec_, bool adjoin_ = true )

    to write to a file, but also

    void writeImages( InputIterator first_, InputIterator last_, Blob *blob_, bool adjoin_ = true)

    to write to a blob. So could you you please add according wrapper code for _ImageList::_writeImages in pgmagick-0.5.x/src/_STL.cpp? Thanks a lot!

  2. Log in to comment