Hello,

I've started my work on the inline viewing of images for InsetGraphics, I
should mention that it is the very first time that I program for X
(directly that is, I played a bit with Gtk but on the highlevel side).

The way I do the inline currently is as follows:

I'll be converting the image file to XPM (with all mutilations required
like rotation resizing and such), this XPM file I load using
XpmLoadFileToPixmap, and display using the Painter::pixmap() function. My
problem currently is that since I do the loading offline, I don't have a
Drawable object that the XpmLoad function requires, I thus use something
I'm unsure of and use:

Display * display = fl_get_display();
Screen * screen = DefaultScreenOfDisplay(display);

and the paramter that I pass as drawable is:
XRootWindowOfScreen(screen)

I actually have no idea what I'm doing here, I just found this snippet in
the examples of the xpm library. Is it good? is it bad? is it ugly?

I currently have something working (i.e. using a static xpm file I can
show it on screen), but there are problems of the various transformations
that are needed, transparent background handling, and the conversion of
the image format to xpm.

Regarding the last point I'll probably hard-code for now the use of
ImageMagicks convert program as the way to go, at least for this start so
I can get the rest up and running, then I'll figure out how to mesh with
the convertor of Dekel.

The transparent part is supported by the XPM library I've seen but I have
yet to figure out how I use it.

and the transformations I have no idea whatsoever...
The current transformations are:
1. Resize (width & height in various methods)
2. Rotate (LaTeX has some strange peculiarities that need to be handled
     somehow, I have no idea how...)
3. Reducing to Grayscale and Monochrome.

That's the current problems, if someone has any insight he can provide me
it will be of a great help, this is completely a new teritory for me.

-- 
  Baruch Even

http://techst02.technion.ac.il/~sbaruch/   (My Site)
http://rpghost.com/jindor/                 (My brothers AD&D site)

" Learn to laugh ... it's the path to true love! " 
   - The Angel in the movie Michael


Reply via email to