--- title: ASImageNode layout: docs permalink: /docs/image-node.html prevPage: text-node.html nextPage: network-image-node.html --- `ASImageNode` is the Texture equivalent to `UIImageView`. The most basic difference is that images are decoded asynchronously by default. Of course, there are more advanced improvments as well such as GIF support and `imageModificationBlock`s. ### Basic Usage Using an image node works exactly like using an image view.
ASImageNode *imageNode = [[ASImageNode alloc] init];
imageNode.image = [UIImage imageNamed:@"someImage"];
imageNode.contentMode = UIViewContentModeScaleAspectFill;
_backgroundImageNode.imageModificationBlock = ^(UIImage *image) {
UIImage *newImage = [image applyBlurWithRadius:30
tintColor:[UIColor colorWithWhite:0.5 alpha:0.3]
saturationDeltaFactor:1.8
maskImage:nil];
return newImage ? newImage : image;
};
//some time later...
_backgroundImageNode.image = someImage;
self.animalImageNode.cropRect = CGRectMake(0, 0, 0.0, 0.0);