diff --git a/Tools/imagesize/imagesize.m b/Tools/imagesize/imagesize.m index 3d427ec65..6ca2eeeb4 100644 --- a/Tools/imagesize/imagesize.m +++ b/Tools/imagesize/imagesize.m @@ -30,6 +30,13 @@ int getImageSize(const char* utf8Path, BOOL appendLineFeed) NSImageRep *representation = representations[0]; NSInteger width = [representation pixelsWide]; NSInteger height = [representation pixelsHigh]; + NSString *extension = [[path pathExtension] lowercaseString]; + + if ([extension isEqualToString:@"svg"]) + { + width = [image size].width; + height = [image size].height; + } NSMutableString* result = [NSMutableString stringWithFormat:@"{\"width\":%ld, \"height\":%ld}", (long)width, (long)height];