using convert to convert an ascii text to an image trouble

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?".
Post Reply
McRib

using convert to convert an ascii text to an image trouble

Post by McRib »

Code: Select all

#!/bin/bash

OUTPUT=`mycommand`
convert -size 100x65 xc:lightblue -font Courier -pointsize 8 \
           -annotate +0+8 "$OUTPUT" -depth 1  -
running the script gives me:

Code: Select all

convert: no encode delegate for this image format `-'.
Writing to a file works, but I would prefer holding the data in the script...

I also need access to the pixels and would prefer something raw. The device that should get the output needs a special treatment:

ABCD -- where each letter stands for one pixel with 2 bits color depth

DCBA -- is what the devices likes to see :-/

Is Imagemagick able to provide should a fancy format ? If not - how close can I get to it ?
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: using convert to convert an ascii text to an image trouble

Post by anthony »

You did not specify what format to use for the output! As the base image was initernally generated IM has no fallback to use.

Replace - with maybe png:- for a PNG format image, output to standard output.

See IM Examples, Image File Handling, Saving Images
http://www.imagemagick.org/Usage/files/#save
In fact you may find the first three sections of IM examples essential reading.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply