~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to utilities/queuemanager/basetools/enhance/sharpen.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-12-21 23:19:11 UTC
  • mfrom: (1.2.33 upstream) (3.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20101221231911-z9jip7s5aht1jqn9
Tags: 2:1.7.0-1ubuntu1
* Merge from Debian Experimental. Remaining Ubuntu changes:
  - Export .pot name and copy to plugins in debian/rules
  - Version build-depends on kipi-plugins-dev to ensure build is against the
    same version on all archs
* Drop debian/patches/kubuntu_01_linker.diff, incoporated upstream
* Remove patches directory and unused patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
{
48
48
 
49
49
Sharpen::Sharpen(QObject* parent)
50
 
       : BatchTool("Sharpen", EnhanceTool, parent)
 
50
    : BatchTool("Sharpen", EnhanceTool, parent)
51
51
{
52
52
    setToolTitle(i18n("Sharpen Image"));
53
53
    setToolDescription(i18n("A tool to sharpen images"));
145
145
bool Sharpen::toolOperations()
146
146
{
147
147
    if (!loadToDImg())
 
148
    {
148
149
        return false;
 
150
    }
149
151
 
150
152
    int filterType  = settings()["SharpenFilterType"].toInt();
151
153
 
157
159
            double sigma;
158
160
 
159
161
            if (radius < 1.0)
 
162
            {
160
163
                sigma = radius;
 
164
            }
161
165
            else
 
166
            {
162
167
                sigma = sqrt(radius);
 
168
            }
163
169
 
164
170
            SharpenFilter filter(&image(), 0L, radius, sigma);
165
171
            filter.startFilterDirectly();