pike.git / src / modules / Image / togif.c

version» Context lines:

pike.git/src/modules/Image/togif.c:1:   /*      togif      Pontus Hagland, law@infovav.se    - $Id: togif.c,v 1.6 1997/04/03 07:00:43 mirar Exp $ + $Id: togif.c,v 1.7 1997/04/30 01:46:54 mirar Exp $      */      /*   **! module Image   **! class image   */      #include "global.h"   
pike.git/src/modules/Image/togif.c:875:   **! method string gif_add_nomap(int x,int y,array(array(int)) colors,float delay_s)   **! method string gif_add_fs_nomap()   **! method string gif_add_fs_nomap(int x,int y)   **! method string gif_add_fs_nomap(int x,int y,int delay_cs)   **! method string gif_add_fs_nomap(int x,int y,float delay_s)   **! method string gif_add_fs_nomap(int x,int y,int num_colors,int delay_cs)   **! method string gif_add_fs_nomap(int x,int y,int num_colors,float delay_s)   **! method string gif_add_fs_nomap(int x,int y,array(array(int)) colors,int delay_cs)   **! method string gif_add_fs_nomap(int x,int y,array(array(int)) colors,float delay_s)   **! Makes a GIF (sub)image data chunk, to be placed - **! at the given position. The "fs" versions uses - **! floyd-steinberg dithering, and the "nomap" versions - **! have no local colormap. - **! returns the GIF data + **! at the given position.   **! -  + **! The "fs" versions uses floyd-steinberg dithering, and the "nomap" + **! versions have no local colormap. + **! + **! Example: + **! <pre> + **! object img1 = Image(200,200); + **! object img2 = Image(200,200); + **! // load img1 and img2 with stuff + **! write(img1->gif_begin()+ + **! img1->gif_netscape_loop()+ + **! img1->gif_add(0,0,100)+ + **! img2->gif_add(0,0,100)+ + **! img1->gif_end()); + **! // voila, a gif animation... + **! + **! note + **! I (Mirar) recommend reading about the GIF file format before + **! experementing with these. + **! returns the GIF data chunk as a string + **!   **! arg int x   **! arg int y   **! the location of this subimage   **! arg int delay_cs   **! frame delay in centiseconds   **! arg float delay_s   **! frame delay in seconds   **! arg int num_colors   **! number of colors to quantize to (default is 256)   **! arg array array(array(int)) colors   **! colors to map to, format is ({({r,g,b}),({r,g,b}),...}). - **! see also: gif_add, gif_end, gif_netscape_loop, togif - */ + **! see also: gif_add, gif_end, gif_netscape_loop, togif */      void image_gif_add(INT32 args)   {    img_gif_add(args,0,1);   }      void image_gif_add_fs(INT32 args)   {    img_gif_add(args,1,1);   }