Skip to content

Commit

Permalink
fix export packed images
Browse files Browse the repository at this point in the history
  • Loading branch information
alexzielenski committed Jul 17, 2015
1 parent 68b8b89 commit d8913c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ThemeEngine/ThemeEngine/Controllers/TEExportController.m
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,12 @@ - (NSBitmapImageRep *)packedRepresentationUsingImages:(NSArray <NSBitmapImageRep

// Grid Layout
NSInteger const numCols = 4;
NSInteger const numRows = ceil(images.count / numCols);
NSInteger const numRows = ceil((CGFloat)images.count / (CGFloat)numCols);

// Evenly space out all the images
CGFloat const itemWidth = [[images valueForKeyPath:@"@max.pixelsWide"] doubleValue];
CGFloat const itemHeight = [[images valueForKeyPath:@"@max.pixelsHigh"] doubleValue];

// Composited Image Dimensions
CGFloat const maxWidth = (itemWidth + kImagePadding) * numCols + kImagePadding;
CGFloat const maxHeight = (itemHeight + kImagePadding) * numRows + kImagePadding;
Expand Down

0 comments on commit d8913c0

Please sign in to comment.