C: adding text to images
Lennart Sorensen
lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Mon Jan 3 22:38:42 UTC 2011
On Wed, Dec 22, 2010 at 06:15:03PM -0500, Giles Orr wrote:
> A friend of mine recently sent me the following question. I hadn't
> any idea, and got his approval to post here. Can anyone assist?
>
> Question:
>
> Background: I'm looking at satellite data. I wrote a program in C that
> does the following: Slurp up raster data in HDF format, feed the data
> to a program that runs something called iterated conditional modes,
> then writes out the raster data in TIFF.
>
> Problem: How do I make a caption with a legend and some text in it?
> I really don't want to do this pixel-by-pixel in the raster data. I was
> hoping for an easy C function like:
>
> add_text (x_loc, y_loc, size, text_string);
>
> ...that would then make the caption in the TIFF.
>
> I have looked around, and will continue to do so, but haven't found
> anything I like yet. I know Gimp can do this, but I don't want to use
> the GUI: I'd like to use this in my C program.
>
> Any suggestions?
libgd. Has interfaces for most scripting languages, and of course is
a C library. It can generate graphics, as well as compose graphics and
text very nicely.
--
Len Sorensen
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list