Re: [gtk-list] Re: Problems with GTK+ .99.8 and Imlib 1.1



On Tue, 24 Mar 1998 raster@redhat.com wrote:

> woudl that be the 3rd frame being displayed? (ie the 3rd frame actually
> dsiplays the first). ?
> 
> the questions is - is each frame a separate ImlibImage, or do you play
> with the RGB data then re-render? do you  pre-render all frames as
> pixmaps, then just flip the pixmaps through y eithe copies or setting
> the window background + clearing?
> 
> ...
> 
> just thinking... how do you change pixmaps between frames? how are you
> loading multiple images or getting frames to differ? (oh.. and imlib
Here is my little function doing the screen update:
-------------------------------------------------------
int PutBild(PICTURE *pic, GdkWindow **win)
{
   GdkWindowAttr  attr;

   if ( *win == NULL ) {
      attr.window_type = GDK_WINDOW_TOPLEVEL;
      attr.wclass      = GDK_INPUT_OUTPUT;
      attr.event_mask  = GDK_STRUCTURE_MASK | GDK_KEY_PRESS_MASK;
      attr.width       = pic->W;
      attr.height      = pic->H;
      *win = gdk_window_new(NULL, &attr, 0);
      gdk_window_set_hints(*win, 0, 0, 1, 1, 0, 0, GDK_HINT_MIN_SIZE);
   }
   gdk_imlib_apply_image(pic->im, *win);
   gdk_window_set_title(*win, pic->FILENAME);
   gdk_window_show(*win);
   gdk_flush();

   return 0;
}
-------------------------------------------------------
where

typedef struct { GdkImlibImage *im;
                 ...
               } PICTURE;

It is called from main() every time a key was pressed. The 
PICTURE structure is every time a different one containing
*different* GdkImlibImages.  So after every keypress event I
want to show a differnt Pixmap rendered by Imlib.  This is
what I called animation because I have als a flavour of my
program that isn't triggered by keypress events.

> sin't desgined for animations... I have another little project brewing
> that is downrigth schwanky for animations... IE.. degined for one thing
> and one thng only.. compress animations with loss, AND play them back
> blindingly fast... I manage 33 frames per second in an 1152x864 window
> in 16bpp at home (full-window animation) the 50 frame 1152x864 anim is
> about 3.8Mb gziped (6.5mb ungzipped) - not too bad... but plays back
> much faster than mpeg - i might pick up that project again in the
> future...
That's not what I need, because I want to handle different pictures,
do some sort of change and than bring them to the screen.  The animation
of the Images for demonstration purposes would be another cup of tea
-- but it is very interesting thing yo wrote!  I would like to hear
from any progress in that project.
 
> anyway.. it mightn't be imlib itself but it coudl be how you update
> your images between frames... gtk could be doing clearing transparently
> or womehting.. depending on what you're doing....
Hmmm, may be that the transparency information isn't correct.

I create the GdkImlibImages via gdk_imlib_create_image_from_data().
It is neccessary to say that it shouldn't be transparent??

Regards

        Andreas.



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