Kaynağa Gözat

* Fixed a memory leak in histogram example

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@3082 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
jylam 16 yıl önce
ebeveyn
işleme
c0359c8aa4
1 değiştirilmiş dosya ile 4 ekleme ve 3 silme
  1. +4
    -3
      examples/histogram.c

+ 4
- 3
examples/histogram.c Dosyayı Görüntüle

@@ -10,7 +10,7 @@ int main(int argc, char *argv[])
{ {
char *srcname = NULL, *dstname = NULL; char *srcname = NULL, *dstname = NULL;
pipi_image_t *img, *newimg, *tmp; pipi_image_t *img, *newimg, *tmp;
pipi_histogram_t* histogram;
pipi_histogram_t* histogram = NULL;
int ret = 0; int ret = 0;
if(argc < 2) if(argc < 2)
{ {
@@ -37,12 +37,13 @@ int main(int argc, char *argv[])
histogram = pipi_new_histogram(); histogram = pipi_new_histogram();
pipi_get_image_histogram(tmp, histogram, PIPI_COLOR_R|PIPI_COLOR_G|PIPI_COLOR_B); pipi_get_image_histogram(tmp, histogram, PIPI_COLOR_R|PIPI_COLOR_G|PIPI_COLOR_B);



pipi_render_histogram(tmp, histogram, PIPI_COLOR_R|PIPI_COLOR_G|PIPI_COLOR_B); pipi_render_histogram(tmp, histogram, PIPI_COLOR_R|PIPI_COLOR_G|PIPI_COLOR_B);


pipi_free_histogram(histogram);

pipi_save(tmp, dstname); pipi_save(tmp, dstname);
pipi_free(newimg); pipi_free(newimg);
pipi_free(tmp);
return ret; return ret;
} }



Yükleniyor…
İptal
Kaydet