XForms: multi-images file

From: Yann Guichoux (guichoux@shom.fr)
Date: Fri Mar 10 2000 - 09:26:21 EST

  • Next message: Steve Lamont: "Re: XForms: quitting a program / canvas demo"

    # To subscribers of the xforms list from Yann Guichoux <guichoux@shom.fr> :

    Hi,

    I'm still manipulating flimage to create some animated gif...but i 've
    got
    a lot of problems to make my code works.

    1st problem - loading and displaying animated gif.

    i'm using flimage_load(fl_image,"./image.gif") to load my "multi-image
    gif file".

    and flimage_display(fl_image,Win) to display it

    I just added these 2 lines in "ibrowser.c" to test it :

    flimage_load(fl_image,"./image.gif");
    flimage_display(fl_image,Win);

    the animated gif is well diplayed...no problem here...

    I added these same 2 lines in my application (just before the
    fl_do_form() main loop)

    the animated gif is not well displayed : i only get the first image of
    the file ...what's going on ????

    here is the fl_image structures i get with ibrowser and with my
    application...they are quite different...but i don't know why...(for
    example the infile field...)

    is there a simple reason ???

    ----------------------------------------------------
    ---------------------------------------------------
    fl_image structure obtained with my application (before displaying the
    image)

    *fl_image = {
        type = 4
        w = 180
        h = 149
        fmt_name = 0x250b38 "gif"
        app_data = (nil)
        u_vdata = (nil)
        red = (nil)
        green = (nil)
        blue = (nil)
        alpha = (nil)
        rgba = ((nil), (nil), (nil), (nil))
        ci = 0x3991c4
        gray = (nil)
        packed = (nil)
        red16 = (nil)
        green16 = (nil)
        blue16 = (nil)
        alpha16 = (nil)
        red_lut = 0x35de30
        green_lut = 0x36a6e8
        blue_lut = 0x351418
        alpha_lut = 0x38b5d0
        lut = (0x35de30, 0x36a6e8, 0x351418, 0x38b5d0)
        map_len = 256
        colors = 0
        gray_maxval = 255
        level = 0
        wwidth = 0
        wlut = (nil)
        wlut_len = 0
        app_background = -1
        comments = (nil)
        comments_len = 0
        available_type = 4
        next = (nil)
        sx = 0
        sy = 0
        sw = 0
        sh = 0
        wx = 0
        wy = 0
        modified = 1
        display = 0x1c3980 = &flimage_sdisplay
        bi_reserved = (0, 0, 0, 0, 0, 0, 0, 0)
        text = (nil)
        ntext = 0
        dont_display_text = 0
        marker = (nil)
        nmarkers = 0
        dont_display_marker = 0
        an_reserved = (0, 0, 0, 0, 0, 0, 0, 0)
        pmin = 0.0
        pmax = 0.0
        poffset = 0.0
        pscale = 1.0
        xdist_offset = 0.0
        xdist_scale = 1.0
        ydist_offset = 0.0
        ydist_scale = 1.0
        px_reserved = (0, 0, 0, 0, 0, 0, 0, 0)
        infile = 0x38e930
    "/home/cmo/guichoux/divers/flitzer.gif"
        outfile = 0x348600 ""
        foffset = 0
        original_type = 4
        pre_write = (nil)
        post_write = (nil)
        f_reserved = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0)
        subx = 0
        suby = 0
        subw = 0
        subh = 0
        sub_shape = 0
        fill_color = 0
        force_convert = 0
        llut = ((nil), (nil), (nil))
        llut_len = 0
        hist = ((nil), (nil), (nil), (nil))
        ip_reserved = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0)
        total = 149
        completed = 149
        visual_cue = 0x1c10a0 = &visual_cue
        error_message = 0x1c13d0 = &error_message
        error_code = 0
        display_type = 0
        pixels = (nil)
        image_spec = (nil)
        xdisplay = 0x2b83b8
        tran_rgb = -1
        tran_index = -1
        matr = 149
        matc = 180
        more = 1
        current_frame = 0
        total_frames = 0
        next_frame = 0x1c838c = &GIF_next
        prev_frame = (nil)
        random_frame = (nil)
        rewind_frame = (nil)
        cleanup = (nil)
        stop_looping = 0
        mi_reserved = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0)
        fpin = (nil)
        fpout = (nil)
        image_io = 0x387500
        io_spec = (nil)
        spec_size = 2788
        depth = 0
        vclass = 0
        visual = (nil)
        xcolormap = 0
        rgb2p = {
            rshift = 0
            rmask = 0
            rbits = 0
            gshift = 0
            gmask = 0
            gbits = 0
            bshift = 0
            bmask = 0
            bbits = 0
            bits_per_rgb = 0
            colormap_size = 0
            reserved = (0, 0)
        }
        ximage = (nil)
        win = 0
        pixamp = 0
        gc = (nil)
        setup = 0x291540
        sdepth = 0
        textgc = (nil)
        internal_reserved = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0)
    }

    the same image loaded with ibrowser (still before displaying the image)
    ------------------------------------------------------
    ------------------------------------------------------
    *image_test = {
        type = 4
        w = 180
        h = 149
        fmt_name = 0xef74da94 "gif"
        app_data = 0x3cea0
        u_vdata = (nil)
        red = (nil)
        green = (nil)
        blue = (nil)
        alpha = (nil)
        rgba = ((nil), (nil), (nil), (nil))
        ci = 0x4edb4
        gray = (nil)
        packed = (nil)
        red16 = (nil)
        green16 = (nil)
        blue16 = (nil)
        alpha16 = (nil)
        red_lut = 0x4dd90
        green_lut = 0x4e198
        blue_lut = 0x4e5a0
        alpha_lut = 0x4e9a8
        lut = (0x4dd90, 0x4e198, 0x4e5a0, 0x4e9a8)
        map_len = 256
        colors = 0
        gray_maxval = 255
        level = 0
        wwidth = 0
        wlut = (nil)
        wlut_len = 0
        app_background = -1
        comments = (nil)
        comments_len = 0
        available_type = 0
        next = (nil)
        sx = 381536
        sy = 4
        sw = 0
        sh = 0
        wx = 0
        wy = 0
        modified = 0
        display = (nil)
        bi_reserved = (0, 1072693248, 0, 0, 0, 1072693248, 0, 0)
        text = (nil)
        ntext = 1072693248
        dont_display_text = 0
        marker = (nil)
        nmarkers = 0
        dont_display_marker = 0
        an_reserved = (0, 0, 0, 0, 0, 315536, 315800, 0)
        pmin = 0.0
        pmax = 2.1219957909653e-314
        poffset = 0.0
        pscale = 0.0
        xdist_offset = 0.0
        xdist_scale = 0.0
        ydist_offset = 0.0
        ydist_scale = 0.0
        px_reserved = (0, 0, 0, 0, 0, 0, 0, 0)
        infile = (nil)
        outfile = (nil)
        foffset = 0
        original_type = 0
        pre_write = (nil)
        post_write = (nil)
        f_reserved = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0)
        subx = 0
        suby = 0
        subw = 0
        subh = 0
        sub_shape = 149
        fill_color = 149U
        force_convert = 83248
        llut = (0x144c0
    "\x9d\xe3\xbf\x98\xf2'\xa0H\xf0'\xa0D\xe0^G\xa0D\xe0^D
    ^P\xe0'\xbf\xfc\xe0^G\xa0H\x80\xa4", (nil), (nil))
        llut_len = 0
        hist = ((nil), (nil), (nil), (nil))
        ip_reserved = (0, 0, 0, 202352, 167300, -1, -1, 149, 180, 1,
    0, 20, -278044644, 0, 0, 0)
        total = 0
        completed = 0
        visual_cue = (nil)
        error_message = (nil)
        error_code = 0
        display_type = 0
        pixels = (nil)
        image_spec = (nil)
        xdisplay = (nil)
        tran_rgb = 0
        tran_index = 0
        matr = 0
        matc = 0
        more = 0
        current_frame = 0
        total_frames = 0
        next_frame = (nil)
        prev_frame = (nil)
        random_frame = (nil)
        rewind_frame = (nil)
        cleanup = 0x41240
        stop_looping = 316064
        mi_reserved = (2788, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0)
        fpin = (nil)
        fpout = (nil)
        image_io = (nil)
        io_spec = (nil)
        spec_size = 0
        depth = 0
        vclass = -277387584
        visual = (nil)
        xcolormap = 0
        rgb2p = {
            rshift = 0
            rmask = 0
            rbits = 0
            gshift = 0
            gmask = 0
            gbits = 0
            bshift = 0
            bmask = 0
            bbits = 0
            bits_per_rgb = 0
            colormap_size = 0
            reserved = (0, 0)
        }
        ximage = (nil)
        win = 257U
        pixamp = 0
        gc = 0x2f757372
        setup = 0x2f736974
        sdepth = 1697604705
        textgc = 0x74612f61
        internal_reserved = (1652126579, 1697605493, 1768122479,
    1970810729, 1835100005, 1932486252, 1769241189, 1915643753, 1711276032,
    0, 0, 0, 0, 0, 0, 0)
    }

    ---------------------------------
    --------------------------------

    2nd problem. making a multi-image file with flimage_dump()

    i don't succeed in making a multi-image file.

    i made about 10 fl_images, linked them with fl_image->next field....and
    tried to save the first fl_image of the list with flimage_dump()
    but it doesn't seem to work...

    is there a way to create a multi-image file with XForms ? (and then an
    animated gif ???)
    _________________________________________________
    To unsubscribe, send the message "unsubscribe" to
    xforms-request@bob.usuhs.mil or see
    http://bob.usuhs.mil/mailserv/xforms.html
    XForms Home Page: http://world.std.com/~xforms
    List Archive: http://bob.usuhs.mil/mailserv/list-archives/



    This archive was generated by hypermail 2b29 : Fri Mar 10 2000 - 09:29:47 EST