Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 08-18-2009, 02:21 PM   #24 (permalink)
vocaro
Registered Member
 
Join Date: Aug 2009
Posts: 14
Default

Quote:
Originally Posted by alones View Post
(in fact, I've fixed Phoney's function considering width and height).
...
Code:
	CGFloat bytesPerRow;
	
	if( thumbRect.size.width > thumbRect.size.height ) {
		bytesPerRow = 4 * thumbRect.size.width;
	} else {
		bytesPerRow = 4 * thumbRect.size.height;
	}
Alones, your fix is wrong. The bytesPerRow parameter is independent of aspect ratio. Even if the image is wider than it is tall, that doesn't affect the bytes per row. PhoneyDeveloper's original code is correct.
vocaro is offline   Reply With Quote
 

» Advertisements
» Online Users: 359
22 members and 337 guests
ADY, bobli, Dani77, Duncan C, ghost, HDshot, HemiMG, ilmman, MarcoAlmeida, MarkC, Meoz, ngaikwad, Punkjumper, Raffaello, Robiwan, Rudy, skrew88, themathminister, timle8n1, wilky94
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,877
Threads: 89,223
Posts: 380,728
Top Poster: BrianSlick (7,129)
Welcome to our newest member, peterkessler45
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:43 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.