Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: c080014c15
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (24 sloc) 0.772 kb
//
// JSTCIImageAdditions.m
// ImageTools
//
// Created by August Mueller on 4/3/11.
// Copyright 2011 Flying Meat Inc. All rights reserved.
//
#import "JSTCIImageAdditions.h"
#import "JSTImageTools.h"
@implementation CIImage (JSTCIImageAdditions)
+ (id)jstImageNamed:(NSString*)imageName {
debug(@"imageName: '%@'", imageName);
debug(@"[NSBundle bundleForClass:self]: '%@'", [NSBundle bundleForClass:self]);
NSURL *url = [[NSBundle bundleForClass:[JSTImageTools class]] URLForImageResource:imageName];
debug(@"url: '%@'", url);
if (!url) {
url = [[NSBundle mainBundle] URLForImageResource:imageName];
}
if (!url) {
return 0x00;
}
return [CIImage imageWithContentsOfURL:url];
}
@end
Jump to Line
Something went wrong with that request. Please try again.