Page 2 of 2

Re: Calling stream.exe from another program

Posted: 2012-06-13T14:00:44-07:00
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 ?

Re: Calling stream.exe from another program

Posted: 2012-06-13T14:11:50-07:00
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

Re: Calling stream.exe from another program

Posted: 2012-06-13T14:28:09-07:00
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

:-(

Re: Calling stream.exe from another program

Posted: 2012-06-13T19:29:06-07:00
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

Re: Calling stream.exe from another program

Posted: 2012-06-13T19:49:21-07:00
by anthony
I believe "stream" only outputs RAW data only.

I don't really use it much, but that was my understanding.

Re: Calling stream.exe from another program

Posted: 2012-06-13T20:04:28-07:00
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.

Re: Calling stream.exe from another program

Posted: 2012-06-13T20:10:46-07:00
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.

Re: Calling stream.exe from another program

Posted: 2012-06-14T01:59:31-07:00
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. :-)