Hi Guys,
My bundle has 4 images. These are there file sizes reported by Mac and Windows:
A = 32690 bytes
B = 49679 bytes
C = 67273 bytes
D = 188 bytes
I load them into an array in the app, for no other reason than to check their
file sizes match here:
Then I send the sizes to log here:
Then this is the log output:
What's going on here?
I haven't even loaded them to UIImage objects yet.
This is strictly looking at file size.
My bundle has 4 images. These are there file sizes reported by Mac and Windows:
A = 32690 bytes
B = 49679 bytes
C = 67273 bytes
D = 188 bytes
I load them into an array in the app, for no other reason than to check their
file sizes match here:
Code:
filePath = [[NSBundle mainBundle] pathForResource:@"mouse" ofType:@"png"];
myData = [NSData dataWithContentsOfFile:filePath];
imgsza = [myData length];
filePath = [[NSBundle mainBundle] pathForResource:@"mousex" ofType:@"png"];
myData = [NSData dataWithContentsOfFile:filePath];
imgszb = [myData length];
filePath = [[NSBundle mainBundle] pathForResource:@"mousec" ofType:@"png"];
myData = [NSData dataWithContentsOfFile:filePath];
imgszc = [myData length];
filePath = [[NSBundle mainBundle] pathForResource:@"diskmask" ofType:@"png"];
myData = [NSData dataWithContentsOfFile:filePath];
imgszd = [myData length];
Then I send the sizes to log here:
Code:
NSLog(@"Size of Image A(bytes):%i",imgsza);
NSLog(@"Size of Image B(bytes):%i",imgszb);
NSLog(@"Size of Image C(bytes):%i",imgszc);
NSLog(@"Size of Image D(bytes):%i",imgszd);
Then this is the log output:
2013-07-20 12:13:16.580 MegaBall[34508:907] Size of Image A(bytes):20695
2013-07-20 12:13:16.583 MegaBall[34508:907] Size of Image B(bytes):37369
2013-07-20 12:13:16.584 MegaBall[34508:907] Size of Image C(bytes):62424
2013-07-20 12:13:16.585 MegaBall[34508:907] Size of Image D(bytes):204
What's going on here?
I haven't even loaded them to UIImage objects yet.
This is strictly looking at file size.