ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

DONE: text as windows wallpaper

(1/3) > >>

mouser:
I'd love a commandline tool that could be invoked by our Popup Wisdom program (and other tools), that would take a string of text on commandline (or text file input name even better), and make a graphic image of this text, sized to the desktop, and then set as the wallpaper image.

In other words, i want a short text file or quote to be displayed as a graphic wallpaper image - and it needs to rescale it so that it fits nicely (maybe parameters for font and padding).

seems like it would be quite a useful commandline tool - not too sure how hard it would be to figure out the proper size of the font to fit on the page; it's ok if it takes a second or two to (off screen) try to fit the text.

Carol Haynes:
ImageMagick command line tool ...

example:

convert -size 320x85 xc:transparent -font Bookman-DemiItalic -pointsize 72 -draw "text 25,60 'Magick'" \
    -channel RGBA -gaussian 0x6 -fill darkred -stroke magenta -draw "text 20,55 'Magick'" fuzzy-magick.png

produces



see here for details

mouser:
first, that is beautiful.
second, yeah i thought of imagemagick -
however my problem in this case is that i've got potentially several lines of text, maybe 1 maybe 10, of varying length, and the key is i need it scaled to fit a specific size.
i suppose one way would be to make a HUGE image, using a pointsize like 72, and then scale the image itself to fit desired size, though my original intention was to figure out font size that would fit.

Carol Haynes:
There must be a windows API call that can tell you the dimensions of a string displayed in a particular font ?? This could give you the maximum line length for one of your lines and allow you to calculate the overall dimensions of the image required to hold the multiple lines of the image. Create it and then scale it to fit the screen size and output as GIF.

As for multiple lines, I presume ImageMagick and join images, so you could just make multiple images and join them together, and then scale.

PS. If you want the binaries for windows the download link is here and you can download the source code here

Carol Haynes:
Just found this site which may also help ... http://www.tonec.com/products/acim/samples/s19.html

also:

http://forum.java.sun.com/thread.jspa?threadID=659290&messageID=3872343

Another fun tool (but not easy to automate, although I suppose you could use a macro engine to do it) is Xara3D. (Downloadable demo version here

I have been using Xara's graphics apps since long before they even though of writing for Windows (and even before they were called Xara) and they are uniformly excellent: XaraXtreme rivals Adobe Illustrator at a fraction of the cost.

Xara3D does one task really well ... it takes text and converts it into images (mainly for use on webpages), applying wonderful effects as you go (including 3D animation etc). You can export the produced graphics in all sorts of formats including animated GIFs, plain image files and even screen saver files.

Here is an example from the "Book of Corkscrews" that I knocked together in about 30 seconds ... and below that an animation based on an example from Xara ...

Navigation

[0] Message Index

[#] Next page

Go to full version