List Info

Thread: Image I/O from stdin




Image I/O from stdin
user name
2005-04-26 13:34:47
Can a Magick::Image be read/written from/to stdin? In the
Image class in
Magick++ I only saw read()/write() methods to blobs and
files, but no
overloaded operator<<()/operator>>(). I don't
know the internals of
Magick++, and I suspect this might not even be possible,
unless the format
of the image being read is known a priori.

I want to do something like this:

some_application | my_ImageMagic++_application | xv -

where some_application outputs an image,
my_ImageMagic++_application reads
it from stdin, and outputs another image, which finally is
piped into xv
for viewing.

Thanks!


_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users
Re: Image I/O from stdin
user name
2005-04-26 14:55:38
Never mind, I figured it out. I can use
Image::read("-") or e.g.
Image::write("-"). 

cin >> image;
or 
cout << image;

would have looked a little more c++, but read/write is fine.




On Tue, 26 Apr 2005 14:34:47 -0400, Amadeus wrote:

> Can a Magick::Image be read/written from/to stdin? In
the Image class in
> Magick++ I only saw read()/write() methods to blobs and
files, but no
> overloaded operator<<()/operator>>(). I
don't know the internals of
> Magick++, and I suspect this might not even be
possible, unless the format
> of the image being read is known a priori.
> 
> I want to do something like this:
> 
> some_application | my_ImageMagic++_application | xv -
> 
> where some_application outputs an image,
my_ImageMagic++_application reads
> it from stdin, and outputs another image, which finally
is piped into xv
> for viewing.
> 
> Thanks!


_______________________________________________
Magick-users mailing list
Magick-usersimagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick
-users
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )