Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm looking for something like ImageMagick's "convert" but that outputs to the console.

The obvious answer is "create a temp file and cat that" but I'd prefer not to have to go to the trouble.

Are there any linux utilities that do this?

share|improve this question
    
I really doubt there will be one that is simpler than convert foo.png foo.jp && cat foo.jpg. –  terdon Apr 4 '13 at 17:10

1 Answer 1

up vote 2 down vote accepted

In ImageMagick convert if you specify the output filename as - then it outputs to stdout. So something like convert myimage.jpg -resize 50% - | do-something-with-resized-image.

To specify that the output type should be different than the input type precede the dash with the type:. So for example: convert myimage.jpg png:- | do-something-with-my-png.

Another alternative would be to look into netpbm.

share|improve this answer
2  
That's exactly what I was looking for. It seems like convert goes off of the filename - how would I go about specifying the output type? –  xtravar Apr 4 '13 at 17:40
    
precede "-" with "type:". I added an example to my answer. –  Wandering Logic Apr 4 '13 at 17:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.