Re: canvas the solution?

Steve Lamont (spl@szechuan.ucsd.edu)
Mon, 31 Mar 97 07:00:17 PST

To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> I had to view a JPEG-picture with xforms.
> First try is to build a application with xforms and after
> showing the forms make an XPutImage(the pict is converted by a
> jpeg-lib).
> This works, but i think there must be a better way to do that.

Out of curiosity, where are you putting the XImage if not into a Canvas?

> Now i think about a canvas to display the pict, is this a better way?

It's probably more straightforward but you'll still have to do the
XPutImage().

> Does anybody know a routine to display directly a jpg-pict, or if there
> is no direct way perhaps someone can show me how to view a pict, from
> which i know the dimension and the rgb-value of each pixel. So i had to
> set each pixel.

I'm not sure I understand what you're asking here.

About the only way of displaying encoded images such as JPEG more or
less directly is to use the X Image Extension which I think *may*
support JPEG (I seem to recall it supporting some form of encoded
image).

However, XIE isn't supported on a lot of X servers (SGI has chosen not
to do so, for instance), so your application will be limited in the
number of platforms on which it can run. It was only released in
X11R6, so if you run your application with any pre-R6 server, you lose.

Another downside of XIE is that it is somewhat arcane and there isn't
a lot of demo code or tutorial documentation.

I considered it for an application here and finally had to
reluctantlyh discard the idea, mostly because of a lack of support by
SGI.

spl

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/xforms-archive/