XPM to pixmap to PCX?(sent again cause I wasn't a member yet)



Hello All,

I am brand new to the gtk development scene (or any mailing list scene for
that matter) so please forgive my ignorance in advance...

The simple question:  Is there any way to export a pixmap or XPM to a
portable file like "gdk_write_pixmap_to_pcx_file" or something generically
simple like that?  The long winded explanation follows for those with more
time.

Thanks!


Anyways I am writing an application that is used to browse through and
analyse data in a series of TIFF files.  I deal with displaying them by
defining a pixel area and extracting that data, building a char** in XPM
format and using the code which follows to build and display it as a pixmap.
This all works fine and dandy (though slow) but the next step is to choose a
region, a start frame and end frame etc and build an animation out of it.
My intent at this point is to just build a GIF file and after looking over
the specification I think the LZW compression is out of my league.  What I
can do is output a bunch of PCX files and use a commercial animation program
to create a single GIF fom them.  So is there a way to get the XPM or pixmap
into a portable output file without writing my own PCX writer?  I have been
collecting information on the PCX file format and it doesn't seem too hard
but code-reuse is wonderful...

  if(Frame<=numFrames){

/*      Build char** pixmapimage from the specified frame, region and
*/
/*      scaling (<=minsig gets black,>=maxsig gets white, scale linear in
between)        */
    pixmapimage = buildXpm(allH,allIm,Frame,
                           startX,endX,startY,endY,
                           minSig,maxSig,zoomFactor,
                           &picData,&picDataSize);

    pixmap = gdk_pixmap_create_from_xpm_d(window->window,
                                          &mask,
                                          &style->bg[GTK_STATE_NORMAL],
                                          (gchar**)pixmapimage);

    gtk_pixmap_set(ImageF,pixmap,mask);




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]