On Sat, 10 Sep 2011 14:24:18 +0200
Daniel Hiepler <ri...@boogiepalace.hopto.org> wrote:
| Hello,
| 
| I try to read multiple images from a stream using MagickReadImageFile().
| But it seems as if MagickReadImageFile() reads the whole stream (feof()
| == TRUE) and only decodes the first Image. Is there a way to read every
| image one after another using MagickWand? Or am I missing something?
| Are all images read at once and put into the MagickWand?
| 
| As example, I have an app "foo" that feeds stdin to
| MagickReadImageFile(). Then I want to do:
| 
| "cat 1.png 2.png 3.png | foo"
| 
| I'd appreciate any hint to do that properly very much...
| 
| best regards


Yes we have already seen this, and discussed it in the forum.

Unless the coder modules can be changed to read just one image
at a time, their is not much we can do.

However I did write a example perl wrapper that pulls one image
from a Ascii PPM stream, then runs a convert command on that image.

http://www.imagemagick.org/Usage/scripts/process_ppm_pipeline

Search on "process_ppm_image" in the forum.


With IMv7 the wrapper program (or if coders are modified) could process
each individual image one at a time in the same command, using a 
"co-processing" technique that I will be adding (starting in a couple of
weeks).

WARNING: I do not know if you can image stream using PNG, as it
may not have a specific EOF marker in the image file format.
Glenn may be able to tell us more and PNG and posible 'image stream'
capability.

On the other hand, The PBMPlus image file formats, PBM,PGM,PPM,PAM
and the IM internal file format MIFF, can do this, though the coders
are written to read all the images up to EOF, and not stop at a
"End of Image", while leaving the file stream open for another image.



  Anthony Thyssen ( System Programmer )    <a.thys...@griffith.edu.au>
 --------------------------------------------------------------------------
  "What you going to do... Sucker me to death?"
                   Scientist to a Dalek   -- Dr Who 2007, "Dalek"
 --------------------------------------------------------------------------
   Anthony's Castle     http://www.ict.griffith.edu.au/anthony/
_______________________________________________
Magick-users mailing list
Magick-users@imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick-users
  • ... Daniel Hiepler
    • ... Anthony Thyssen
    • ... da . mihi . sis . bubulae . frustrum . assae . solana . tuberosa . in . modo . gallico . fricta . ac . quassum . lactatum . coagulatum . crassum
      • ... Daniel Hiepler
      • ... Anthony Thyssen
    • ... da . mihi . sis . bubulae . frustrum . assae . solana . tuberosa . in . modo . gallico . fricta . ac . quassum . lactatum . coagulatum . crassum

Reply via email to