Ignore:
Timestamp:
08/02/08 02:00:51 (5 years ago)
Author:
sam
Message:
  • pipi.c: reimplement pipi_new() without relying on the underlying codec library, so we can have several or none of them at some time.
  • sdl.c imlib.c: allow to save images that weren't created using the current codec.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpipi/trunk/pipi/codec.c

    r2607 r2629  
    3939} 
    4040 
    41 pipi_image_t *pipi_new(int width, int height) 
    42 { 
    43 #if USE_SDL 
    44     return pipi_new_sdl(width, height); 
    45 #elif USE_IMLIB2 
    46     return pipi_new_imlib2(width, height); 
    47 #elif USE_OPENCV 
    48     return pipi_new_opencv(width, height); 
    49 #endif 
    50 } 
    51  
    5241void pipi_free(pipi_image_t *img) 
    5342{ 
    54     unsigned int i; 
     43    int i; 
    5544 
    5645    for(i = 0; i < PIPI_PIXELS_MAX; i++) 
     
    5948 
    6049#if USE_SDL 
    61     return pipi_free_sdl(img); 
     50    pipi_free_sdl(img); 
    6251#elif USE_IMLIB2 
    63     return pipi_free_imlib2(img); 
     52    pipi_free_imlib2(img); 
    6453#elif USE_OPENCV 
    65     return pipi_free_opencv(img); 
     54    pipi_free_opencv(img); 
    6655#endif 
     56 
     57    free(img); 
    6758} 
    6859 
Note: See TracChangeset for help on using the changeset viewer.