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

version» Context lines:

pike.git/src/modules/Image/pnm.c:1: - /* $Id: pnm.c,v 1.9 1998/01/13 22:59:24 hubbe Exp $ */ + /* $Id: pnm.c,v 1.10 1998/04/20 18:53:32 grubba Exp $ */      /*   **! module Image   **! note - **! $Id: pnm.c,v 1.9 1998/01/13 22:59:24 hubbe Exp $ + **! $Id: pnm.c,v 1.10 1998/04/20 18:53:32 grubba Exp $   **! class image   */      #include "global.h"      #include <math.h>   #include <ctype.h>      #include "stralloc.h"   #include "global.h"
pike.git/src/modules/Image/pnm.c:51:   **! pnm data, as a string   */      void img_pnm_encode_binary(INT32 args);   void img_pnm_decode(INT32 args);      void image_toppm(INT32 args)   {    pop_n_elems(args);    -  THISOBJ->refs++; -  push_object(THISOBJ); +  ref_push_object(THISOBJ);       img_pnm_encode_binary(1);   }      void image_frompnm(INT32 args)   {    struct image *img;    img_pnm_decode(args);       img=(struct image*)get_storage(sp[-1].u.object,image_program);    if (THIS->img) free(THIS->img);    *THIS=*img;    THIS->img=malloc(img->xsize*img->ysize*sizeof(rgb_group)+1);    if (!THIS->img) error("out of memory\n");    MEMCPY(THIS->img,img->img,img->xsize*img->ysize*sizeof(rgb_group));    pop_n_elems(1); -  THISOBJ->refs++; -  push_object(THISOBJ); +  ref_push_object(THISOBJ);   }