[SOLVED] writeImages/readImages to/from blog buggy?

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
speed7slow
Posts: 2
Joined: 2012-04-14T15:43:35-07:00
Authentication code: 8675308

[SOLVED] writeImages/readImages to/from blog buggy?

Post by speed7slow »

i'm trying to write a 2-layered psd to a blob and then write the blob to the disk,
and i fail. can anybody tell me, if this is a (known) bug, or if i am doing something wrong?
what i do is:

Code: Select all

		list<Image> layers;

		// copy original image as layer
		layers.push_back (originalImage);
		layers.push_back (processedImage );

		Blob sinkBlob;
		std::string inputFile = filename.toStdString();
		writeImages( layers.begin(), layers.end(), &sinkBlob, true );

		list<Image> layers2;
		readImages(&layers2, sinkBlob);
		std::cout << "afterwards: " << layers2.size();
now when doing writeimages and then readimages, it only receives one image.
the second one seems lost.
BUT if i do instead write it to disk instead of a blob, i.e.

Code: Select all

		writeImages( layers.begin(), layers.end(), "/tmp/sinkBlob.psd", true );
		readImages(&layers2, "/tmp/sinkBlob.psd");
i get back the full two layers.

am i doing something wrong?

actually the idea with writing to a blob and reading from the blob is that i use
exiv2 to modify the exif data, and after its done, the modified blob should be written.
in the example above as you see there is no exiv2 involved, but still i get that strange
result.

version of imagemagick used is the ubuntu 12.10 beta 2 (latest current beta)

Version: ImageMagick 6.7.6-1 2012-04-01 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP


thanks in advance for any help!
Last edited by speed7slow on 2012-04-14T18:51:11-07:00, edited 1 time in total.
speed7slow
Posts: 2
Joined: 2012-04-14T15:43:35-07:00
Authentication code: 8675308

Re: writeImages/readImages to/from blog buggy?

Post by speed7slow »

ok, mystery solved,
forgot to magick the images like
processedImage.magick("PSD");
Post Reply