Calling stream.exe from another program

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
mrdo
Posts: 21
Joined: 2012-05-31T02:53:08-07:00
Authentication code: 13

Re: Calling stream.exe from another program

Post by mrdo »

ok, i'm testing the two seperate commands from the command line before i go any further :

Code: Select all

D:\PROGRA~2\IMAGEM~1.6-Q\stream -map rgb -storage-type char -extract 4200x5880+0+0 "D:\Thumbnails\DEMO\16_26-_19_log_LOG_COMP_233938443.tif[0]" "D:\Thumbnails\DEMO\image.miff"
works fine, however the following doesn't seem to work :

Code: Select all

D:\PROGRA~2\IMAGEM~1.6-Q\convert "D:\Thumbnails\DEMO\image.miff" -density 300 -size 4200x5880 -depth 8 rgb:- "D:\Thumbnails\DEMO\16_26-_19_log_LOG_COMP_233938443_full.jpg"
any ideas ?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Calling stream.exe from another program

Post by fmw42 »

D:\PROGRA~2\IMAGEM~1.6-Q\convert "D:\Thumbnails\DEMO\image.miff" -density 300 -size 4200x5880 -depth 8 rgb:- "D:\Thumbnails\DEMO\16_26-_19_log_LOG_COMP_233938443_full.jpg"
This second command does not make sense to me, if you can display the image.miff from the first command.

-size does nothing as the size is already in the miff file. Do you want to resize it?

Likewise, remove rgb:- in the second command. That is still trying to read something from standard in and there is nothing there.

Again this is just a guess on my part as I really do not understand the stream command in your first line. I assume that you tell stream how big an image to read in from raw rgb data. From there the miff output contains the proper information
mrdo
Posts: 21
Joined: 2012-05-31T02:53:08-07:00
Authentication code: 13

Re: Calling stream.exe from another program

Post by mrdo »

ok, i've stripped everything back as follows :

Code: Select all

D:\PROGRA~2\IMAGEM~1.6-Q\convert "D:\Thumbnails\DEMO\image.miff" "D:\Thumbnails\DEMO\16_26-_19_log_LOG_COMP_233938443_full.jpg"
and get the following error :

Improper Image Header, no images defined

:-(
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Calling stream.exe from another program

Post by fmw42 »

OK. Sorry I do not know what to tell you. You probably need to hear back from Anthony or Magick as I really don't know stream at all.

Otherwise, see
http://www.imagemagick.org/script/stream.php
http://www.imagemagick.org/Usage/basics/#stream
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Calling stream.exe from another program

Post by anthony »

I believe "stream" only outputs RAW data only.

I don't really use it much, but that was my understanding.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Calling stream.exe from another program

Post by fmw42 »

So then one would have to save the result of the stream stream as image.rgb. Then read image.rgb in for the second command giving its -size specification.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Calling stream.exe from another program

Post by anthony »

fmw42 wrote:So then one would have to save the result of the stream stream as image.rgb. Then read image.rgb in for the second command giving its -size specification.
That is my understanding. The actual raw format and order can be specified in stream using its 'special' -format option.
I don't know much more than that though.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
mrdo
Posts: 21
Joined: 2012-05-31T02:53:08-07:00
Authentication code: 13

Re: Calling stream.exe from another program

Post by mrdo »

thanks a lot for your help guys, i've managed to get the following to work :

Code: Select all

D:\PROGRA~2\IMAGEM~1.6-Q\convert -size 4200x5880 -depth 8 rgb:"D:\Thumbnails\DEMO\image.rgb" "D:\Thumbnails\DEMO\16_26-_19_log_LOG_COMP_233938443_full.jpg"
your help is much appreciated - thanks for taking the time to help me. :-)
Post Reply