~ubuntu-branches/debian/sid/wordpress/sid

« back to all changes in this revision

Viewing changes to debian/missing-sources/plupload-1.5.4/csharp/Plupload/FJCore/Filter/FilterLowpassResize.cs

  • Committer: Package Import Robot
  • Author(s): Raphaël Hertzog
  • Date: 2013-09-04 23:18:58 UTC
  • mfrom: (1.2.28)
  • Revision ID: package-import@ubuntu.com-20130904231858-nljmn1buzswh63jk
Tags: 3.6+dfsg-1
* New upstream release.
* Improve wp-settings to verify that $_SERVER['HTTP_X_FORWARDED_PROTO']
  exists before accessing it (avoids a PHP notice).
  Thanks to Paul Dreik <slask@pauldreik.se> for the report and the patch.
* Document in README.Debian the need to login to /wp-admin/ to complete
  an upgrade.
* Drop useless debian/README.source
* Drop 008CVE2008-2392.patch since upstream now disables unfiltered
  uploads by default. See http://core.trac.wordpress.org/ticket/10692
* Drop 009CVE2008-6767.patch since the backto parameter is validated
  against a whitelist, and externally triggered upgrades are not a
  security problem as long as they work.
* Update debian/missing-sources with latest versions.
* Update upstream l10n.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/// Copyright (c) 2009 Jeffrey Powers for Occipital Open Source.
2
 
/// Under the MIT License, details: License.txt.
3
 
 
4
 
namespace FluxJpeg.Core.Filtering
5
 
{
6
 
    using System;
7
 
 
8
 
    internal class LowpassResize : Filter
9
 
    {
10
 
        protected override void ApplyFilter()
11
 
        {
12
 
            // get source image size
13
 
            int width = _sourceData[0].GetLength(0),
14
 
                height = _sourceData[0].GetLength(1);
15
 
 
16
 
            int channels = _sourceData.Length;
17
 
 
18
 
            // Estimate a good filter size for the gaussian.
19
 
            // Note that gaussian isn't an ideal bandpass filter
20
 
            //  so this is an experimentally determined quantity
21
 
            double std = (width / _newWidth) * 0.50;
22
 
 
23
 
            for(int i = 0; i < channels; i++)
24
 
            {
25
 
                GrayImage channel = new GrayImage(_sourceData[i]);
26
 
 
27
 
                channel = Convolution.Instance.GaussianConv(channel, std);
28
 
 
29
 
                _sourceData[i] = channel.ToByteArray2D();
30
 
            }
31
 
 
32
 
            // number of pixels to shift in the original image
33
 
            double xStep = (double)width / _newWidth,
34
 
                   yStep = (double)height / _newHeight;
35
 
 
36
 
 
37
 
            NNResize resizer = new NNResize();
38
 
 
39
 
             _destinationData = resizer.Apply(_sourceData, _newWidth, _newHeight);
40
 
 
41
 
 
42
 
        }
43
 
    }
44
 
}