Page 1 of 1

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

Posted: 2012-04-14T15:53:25-07:00
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

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

Version: ImageMagick 6.7.6-1 2012-04-01 Q16
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
Features: OpenMP

thanks in advance for any help!

Re: writeImages/readImages to/from blog buggy?

Posted: 2012-04-14T18:50:38-07:00
by speed7slow
ok, mystery solved,
forgot to magick the images like