Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/BradLarson/GPUImage
Browse files Browse the repository at this point in the history
  • Loading branch information
sromanuk committed Feb 2, 2013
2 parents 5459990 + cef40ae commit 0a53ec7
Show file tree
Hide file tree
Showing 36 changed files with 1,127 additions and 88 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# GPUImage framework #

<div style="float: right"><img src="http://sunsetlakesoftware.com/sites/default/files/GPUImageLogo.png" /></div>

Brad Larson

http://www.sunsetlakesoftware.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
case GPUIMAGE_AMATORKA: cell.textLabel.text = @"Amatorka (Lookup)"; break;
case GPUIMAGE_PIXELLATE: cell.textLabel.text = @"Pixellate"; break;
case GPUIMAGE_POLARPIXELLATE: cell.textLabel.text = @"Polar pixellate"; break;
case GPUIMAGE_PIXELLATE_POSITION: cell.textLabel.text = @"Pixellate (position)"; break;
case GPUIMAGE_POLKADOT: cell.textLabel.text = @"Polka dot"; break;
case GPUIMAGE_HALFTONE: cell.textLabel.text = @"Halftone"; break;
case GPUIMAGE_CROSSHATCH: cell.textLabel.text = @"Crosshatch"; break;
Expand Down Expand Up @@ -148,6 +149,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
case GPUIMAGE_SCREENBLEND: cell.textLabel.text = @"Screen blend"; break;
case GPUIMAGE_COLORBURN: cell.textLabel.text = @"Color burn blend"; break;
case GPUIMAGE_COLORDODGE: cell.textLabel.text = @"Color dodge blend"; break;
case GPUIMAGE_LINEARBURN: cell.textLabel.text = @"Linear burn blend"; break;
case GPUIMAGE_ADD: cell.textLabel.text = @"Add blend"; break;
case GPUIMAGE_DIVIDE: cell.textLabel.text = @"Divide blend"; break;
case GPUIMAGE_MULTIPLY: cell.textLabel.text = @"Multiply blend"; break;
Expand All @@ -164,6 +166,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
case GPUIMAGE_SATURATIONBLEND: cell.textLabel.text = @"Saturation blend"; break;
case GPUIMAGE_LUMINOSITYBLEND: cell.textLabel.text = @"Luminosity blend"; break;
case GPUIMAGE_NORMALBLEND: cell.textLabel.text = @"Normal blend"; break;
case GPUIMAGE_POISSONBLEND: cell.textLabel.text = @"Poisson blend"; break;
case GPUIMAGE_OPACITY: cell.textLabel.text = @"Opacity adjustment"; break;
case GPUIMAGE_KUWAHARA: cell.textLabel.text = @"Kuwahara"; break;
case GPUIMAGE_VIGNETTE: cell.textLabel.text = @"Vignette"; break;
Expand All @@ -173,6 +176,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
case GPUIMAGE_BILATERAL: cell.textLabel.text = @"Bilateral blur"; break;
case GPUIMAGE_BOXBLUR: cell.textLabel.text = @"Box blur"; break;
case GPUIMAGE_GAUSSIAN_SELECTIVE: cell.textLabel.text = @"Gaussian selective blur"; break;
case GPUIMAGE_GAUSSIAN_POSITION: cell.textLabel.text = @"Gaussian (centered)"; break;
case GPUIMAGE_UIELEMENT: cell.textLabel.text = @"UI element"; break;
case GPUIMAGE_CUSTOM: cell.textLabel.text = @"Custom"; break;
case GPUIMAGE_FILECONFIG: cell.textLabel.text = @"Filter Chain"; break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ typedef enum {
GPUIMAGE_AVERAGELUMINANCETHRESHOLD,
GPUIMAGE_PIXELLATE,
GPUIMAGE_POLARPIXELLATE,
GPUIMAGE_PIXELLATE_POSITION,
GPUIMAGE_POLKADOT,
GPUIMAGE_HALFTONE,
GPUIMAGE_CROSSHATCH,
Expand Down Expand Up @@ -66,6 +67,7 @@ typedef enum {
GPUIMAGE_VIGNETTE,
GPUIMAGE_GAUSSIAN,
GPUIMAGE_GAUSSIAN_SELECTIVE,
GPUIMAGE_GAUSSIAN_POSITION,
GPUIMAGE_FASTBLUR,
GPUIMAGE_BOXBLUR,
GPUIMAGE_MEDIAN,
Expand Down Expand Up @@ -94,6 +96,7 @@ typedef enum {
GPUIMAGE_DARKEN,
GPUIMAGE_COLORBURN,
GPUIMAGE_COLORDODGE,
GPUIMAGE_LINEARBURN,
GPUIMAGE_SCREENBLEND,
GPUIMAGE_DIFFERENCEBLEND,
GPUIMAGE_SUBTRACTBLEND,
Expand All @@ -105,6 +108,7 @@ typedef enum {
GPUIMAGE_SATURATIONBLEND,
GPUIMAGE_LUMINOSITYBLEND,
GPUIMAGE_NORMALBLEND,
GPUIMAGE_POISSONBLEND,
GPUIMAGE_OPACITY,
GPUIMAGE_CUSTOM,
GPUIMAGE_UIELEMENT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,17 @@ - (void)setupFilter;

filter = [[GPUImagePolarPixellateFilter alloc] init];
}; break;
case GPUIMAGE_PIXELLATE_POSITION:
{
self.title = @"Pixellate (position)";
self.filterSettingsSlider.hidden = NO;

[self.filterSettingsSlider setValue:0.25];
[self.filterSettingsSlider setMinimumValue:0.0];
[self.filterSettingsSlider setMaximumValue:0.5];

filter = [[GPUImagePixellatePositionFilter alloc] init];
}; break;
case GPUIMAGE_POLKADOT:
{
self.title = @"Polka Dot";
Expand Down Expand Up @@ -970,6 +981,14 @@ - (void)setupFilter;

filter = [[GPUImageColorDodgeBlendFilter alloc] init];
}; break;
case GPUIMAGE_LINEARBURN:
{
self.title = @"Linear Burn Blend";
self.filterSettingsSlider.hidden = YES;
needsSecondImage = YES;

filter = [[GPUImageLinearBurnBlendFilter alloc] init];
}; break;
case GPUIMAGE_EXCLUSIONBLEND:
{
self.title = @"Exclusion Blend";
Expand Down Expand Up @@ -1050,6 +1069,18 @@ - (void)setupFilter;

filter = [[GPUImageNormalBlendFilter alloc] init];
}; break;
case GPUIMAGE_POISSONBLEND:
{
self.title = @"Poisson Blend";
self.filterSettingsSlider.hidden = NO;
needsSecondImage = YES;

[self.filterSettingsSlider setMinimumValue:0.0];
[self.filterSettingsSlider setMaximumValue:1.0];
[self.filterSettingsSlider setValue:0.5];

filter = [[GPUImagePoissonBlendFilter alloc] init];
}; break;

case GPUIMAGE_OPACITY:
{
Expand Down Expand Up @@ -1147,6 +1178,18 @@ - (void)setupFilter;
filter = [[GPUImageGaussianSelectiveBlurFilter alloc] init];
[(GPUImageGaussianSelectiveBlurFilter*)filter setExcludeCircleRadius:40.0/320.0];
}; break;
case GPUIMAGE_GAUSSIAN_POSITION:
{
self.title = @"Selective Blur";
self.filterSettingsSlider.hidden = NO;

[self.filterSettingsSlider setMinimumValue:0.0];
[self.filterSettingsSlider setMaximumValue:.75f];
[self.filterSettingsSlider setValue:40.0/320.0];

filter = [[GPUImageGaussianBlurPositionFilter alloc] init];
[(GPUImageGaussianBlurPositionFilter*)filter setBlurRadius:40.0/320.0];
}; break;
case GPUIMAGE_BILATERAL:
{
self.title = @"Bilateral Blur";
Expand Down Expand Up @@ -1449,6 +1492,7 @@ - (IBAction)updateFilterFromSlider:(id)sender;
case GPUIMAGE_SEPIA: [(GPUImageSepiaFilter *)filter setIntensity:[(UISlider *)sender value]]; break;
case GPUIMAGE_PIXELLATE: [(GPUImagePixellateFilter *)filter setFractionalWidthOfAPixel:[(UISlider *)sender value]]; break;
case GPUIMAGE_POLARPIXELLATE: [(GPUImagePolarPixellateFilter *)filter setPixelSize:CGSizeMake([(UISlider *)sender value], [(UISlider *)sender value])]; break;
case GPUIMAGE_PIXELLATE_POSITION: [(GPUImagePixellatePositionFilter *)filter setRadius:[(UISlider *)sender value]]; break;
case GPUIMAGE_POLKADOT: [(GPUImagePolkaDotFilter *)filter setFractionalWidthOfAPixel:[(UISlider *)sender value]]; break;
case GPUIMAGE_HALFTONE: [(GPUImageHalftoneFilter *)filter setFractionalWidthOfAPixel:[(UISlider *)sender value]]; break;
case GPUIMAGE_SATURATION: [(GPUImageSaturationFilter *)filter setSaturation:[(UISlider *)sender value]]; break;
Expand Down Expand Up @@ -1477,6 +1521,7 @@ - (IBAction)updateFilterFromSlider:(id)sender;
case GPUIMAGE_ADAPTIVETHRESHOLD: [(GPUImageAdaptiveThresholdFilter *)filter setBlurSize:[(UISlider*)sender value]]; break;
case GPUIMAGE_AVERAGELUMINANCETHRESHOLD: [(GPUImageAverageLuminanceThresholdFilter *)filter setThresholdMultiplier:[(UISlider *)sender value]]; break;
case GPUIMAGE_DISSOLVE: [(GPUImageDissolveBlendFilter *)filter setMix:[(UISlider *)sender value]]; break;
case GPUIMAGE_POISSONBLEND: [(GPUImagePoissonBlendFilter *)filter setMix:[(UISlider *)sender value]]; break;
case GPUIMAGE_LOWPASS: [(GPUImageLowPassFilter *)filter setFilterStrength:[(UISlider *)sender value]]; break;
case GPUIMAGE_HIGHPASS: [(GPUImageHighPassFilter *)filter setFilterStrength:[(UISlider *)sender value]]; break;
case GPUIMAGE_MOTIONDETECTOR: [(GPUImageMotionDetector *)filter setLowPassFilterStrength:[(UISlider *)sender value]]; break;
Expand Down Expand Up @@ -1506,11 +1551,13 @@ - (IBAction)updateFilterFromSlider:(id)sender;
case GPUIMAGE_MOSAIC: [(GPUImageMosaicFilter *)filter setDisplayTileSize:CGSizeMake([(UISlider *)sender value], [(UISlider *)sender value])]; break;
case GPUIMAGE_VIGNETTE: [(GPUImageVignetteFilter *)filter setVignetteEnd:[(UISlider *)sender value]]; break;
case GPUIMAGE_GAUSSIAN: [(GPUImageGaussianBlurFilter *)filter setBlurSize:[(UISlider*)sender value]]; break;
case GPUIMAGE_BILATERAL: [(GPUImageBilateralFilter *)filter setBlurSize:[(UISlider*)sender value]]; break;
// case GPUIMAGE_BILATERAL: [(GPUImageBilateralFilter *)filter setBlurSize:[(UISlider*)sender value]]; break;
case GPUIMAGE_BILATERAL: [(GPUImageBilateralFilter *)filter setDistanceNormalizationFactor:[(UISlider*)sender value]]; break;
case GPUIMAGE_FASTBLUR: [(GPUImageFastBlurFilter *)filter setBlurPasses:round([(UISlider*)sender value])]; break;
// case GPUIMAGE_FASTBLUR: [(GPUImageFastBlurFilter *)filter setBlurSize:[(UISlider*)sender value]]; break;
case GPUIMAGE_OPACITY: [(GPUImageOpacityFilter *)filter setOpacity:[(UISlider *)sender value]]; break;
case GPUIMAGE_GAUSSIAN_SELECTIVE: [(GPUImageGaussianSelectiveBlurFilter *)filter setExcludeCircleRadius:[(UISlider*)sender value]]; break;
case GPUIMAGE_GAUSSIAN_POSITION: [(GPUImageGaussianBlurPositionFilter *)filter setBlurRadius:[(UISlider *)sender value]]; break;
case GPUIMAGE_FILTERGROUP: [(GPUImagePixellateFilter *)[(GPUImageFilterGroup *)filter filterAtIndex:1] setFractionalWidthOfAPixel:[(UISlider *)sender value]]; break;
case GPUIMAGE_CROP: [(GPUImageCropFilter *)filter setCropRegion:CGRectMake(0.0, 0.0, 1.0, [(UISlider*)sender value])]; break;
case GPUIMAGE_TRANSFORM: [(GPUImageTransformFilter *)filter setAffineTransform:CGAffineTransformMakeRotation([(UISlider*)sender value])]; break;
Expand Down
Binary file added examples/SharedIcons/Icon-72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/SharedIcons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/SharedIcons/Icon-Small-50.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/SharedIcons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/SharedIcons/Icon-Small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/SharedIcons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/SharedIcons/Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/SharedIcons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added examples/SharedIcons/iTunesArtwork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0a53ec7

Please sign in to comment.