~ubuntu-branches/ubuntu/maverick/digikam/maverick

« back to all changes in this revision

Viewing changes to libs/greycstoration/greycstoration.h

  • Committer: Bazaar Package Importer
  • Author(s): Luka Renko
  • Date: 2009-03-17 23:07:56 UTC
  • mfrom: (1.2.20 upstream) (3.1.4 experimental)
  • Revision ID: james.westby@ubuntu.com-20090317230756-db5b8rqjwb2j35e5
Tags: 2:0.10.0-1ubuntu1
* Remaining changes to Debian (committed to Debian SVN):
  - Depends: kde-icons-oxygen dropped (included through kdelibs)
  - Recommends: kipi-plugins added (provides major functionality)
  - debian/digikamthemedesigner.manpage: add missing manpage
* Remaning change to Debian:
  - Section: devel for -dbg package (no debug in Jaunty)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
  #
3
3
  #  File        : greycstoration.h
4
 
  #                ( C++ header file )
 
4
  #                ( C++ header file - CImg plug-in )
5
5
  #
6
6
  #  Description : GREYCstoration plug-in allowing easy integration in
7
7
  #                third parties softwares.
52
52
#define cimg_plugin_greycstoration
53
53
 
54
54
//------------------------------------------------------------------------------
55
 
// GREYCstoration parameter structure, storing important information about
 
55
// GREYCstoration parameter structure, storing important informations about
56
56
// algorithm parameters and computing threads.
57
57
// ** This structure has not to be manipulated by the API user, so please just
58
58
// ignore it if you want to **
130
130
  return *this;
131
131
}
132
132
 
133
 
//! Return the GREYCstoration progress bar indices (between 0 and 100).
 
133
//! Return the GREYCstoration progress bar indice (between 0 and 100).
134
134
float greycstoration_progress() const {
135
135
  if (!greycstoration_is_running()) return 0.0f;
136
136
  const unsigned long counter = greycstoration_params->counter?*(greycstoration_params->counter):0;
409
409
                else img.blur_anisotropic(mask_tile,p.amplitude,p.sharpness,p.anisotropy,
410
410
                                          p.alpha,p.sigma,p.dl,p.da,p.gauss_prec,p.interpolation,p.fast_approx,p.gfact);
411
411
                greycstoration_mutex_lock(p);
412
 
                temporary.draw_image(img.crop(b,b,b,img.width-b,img.height-b,img.depth-b),x,y,z);
 
412
                temporary.draw_image(x,y,z,img.crop(b,b,b,img.width-b,img.height-b,img.depth-b));
413
413
              }
414
414
      } else {
415
415
        for (unsigned int y=0; y<source.height && !*(p.stop_request); y+=p.tile)
427
427
              if (p.patch_based) img.blur_patch(p.patch_size,p.sigma_p,p.sigma_s,p.lookup_size,p.fast_approx);
428
428
              else img.blur_anisotropic(mask_tile,p.amplitude,p.sharpness,p.anisotropy,
429
429
                                        p.alpha,p.sigma,p.dl,p.da,p.gauss_prec,p.interpolation,p.fast_approx,p.gfact);
430
 
              temporary.draw_image(img.crop(b,b,img.width-b,img.height-b),x,y);
 
430
              temporary.draw_image(x,y,img.crop(b,b,img.width-b,img.height-b));
431
431
              greycstoration_mutex_lock(p);
432
432
            }
433
433
      }