---
title: Image Scaling
layout: docs
permalink: /docs/debug-tool-pixel-scaling.html
prevPage: debug-tool-hit-test-visualization.html
nextPage: debug-tool-ASRangeController.html
---
## Visualize ASImageNode.image’s pixel scaling
This debug feature adds a red text overlay on the bottom right hand corner of an ASImageNode if (and only if) the image’s size in pixels does not match it’s bounds size in pixels, e.g.
CGFloat imageSizeInPixels = image.size.width * image.size.height;
CGFloat boundsSizeInPixels = imageView.bounds.size.width * imageView.bounds.size.height;
CGFloat scaleFactor = imageSizeInPixels / boundsSizeInPixels;
if (scaleFactor != 1.0) {
NSString *scaleString = [NSString stringWithFormat:@"%.2fx", scaleFactor];
_debugLabelNode.hidden = NO;
}
AsyncDisplayKit+Debug.h
[ASImageNode setShouldShowImageScalingOverlay:YES]
at the top of your AppDelegate's didFinishLaunchingWithOptions:
method