madd@world.std.com (jim frost) (11/09/89)
BEGEMAN%OPUS%MCOIARC.BITNET@cornellc.cit.cornell.edu writes: >Does anyone have a short c program that will display a grayscale image in >X windows? I just need some example code to get started on being able to >display short movie loops of images in X. Sure, I have a program called xloadimage which can load a variety of image types and display them. One of the image types is the Faces Project image type, which is a 8-bit greyscale image. It shouldn't take a lot of work to convert that to handle any greyscale. Xloadimage is not designed for 'movie' type displays, but it would be trivial to modify it to send a bunch of pixmaps and rotate through them; you ought to get very good performance although you'll want a LOT of memory if the images are large or you have very many of them. Xloadimage isn't particularly short, mostly because it has a lot of options and can load multiple image types. The code to set up, send, and display an image is only a few hundred lines of code, though. Interested? I can email to anyone who is but I'm planning to have xloadimage posted to comp.sources.x in the near future so if you don't have a great need, please wait for that. While I'm doing image types, does anyone know what the format is for 24-bit Sun rasterfiles? I have to assume that it doesn't have a 16mb colormap. Mostly I just need any special header indicators (eg is ras_maptype == RMT_RAW?) and the pixel format. If there is a greyscale format, I'd like that too. jim frost software tool & die "The World" Public Access Unix for the '90s madd@std.com +1 617-739-WRLD 24hrs {3,12,24}00bps