Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jtbullet

macrumors member
Original poster
Jan 19, 2009
30
0
Hi. In my neverending quest to produce a workable set of source code that comic artists can use to create sellable comic books, I have had an epiphany.

I know that the iphone will play quicktime files. Lets say my comic is 100 images. I can make a .mov file that is 100 frames at actual 320x480 size. Is there a way to control the frame rate? Is there any code in the sdk that will advance the movie by one frame? And reverse it by one frame?

The biggest hindrance in this code is the amount of coding involved in linking the images in multiple view to switch between, making customizing it for a no programming comic artist extremely cumbersome and time consuming. By changing the method to the single file movie, things would be simplified. But I need someone to tell me if the media controls allow for advancing movies a frame at a time. I know it sounds unconventional, but I think this would be the simplest way to do things.

Thanks, and please help the open source comic project! Stephen Kochan has expressed interest in the project, so I know there are people that think it is a good idea.
 

johnnyjibbs

macrumors 68030
Sep 18, 2003
2,964
122
London, UK
AFAIK, there is no way to advance a movie frame by frame on iPhone as the only API to play movies - MPMoviePlayer - is very simplistic, allowing playback and stop only. Could you not somehow utilise UIImageView's animationImages property to create the same effect?
 

jtbullet

macrumors member
Original poster
Jan 19, 2009
30
0
Johnny, thanks for the heads up. Thanks for stopping me from going down that trail. I will look into the other property. As anyone who reads about this project knows, I am not a programmer, but an artist trying to create an open source method for comic creation, that is dummy proof. Im hoping this can encourage more artists to move to mobile platforms. The print industry is dying, but not from technology surpassing it. The corporate mentalities behind publishing houses is simply self destructive, and the iPhone offers a way to keep tomorrows great artists from disappearing.
Thanks again.
Remember, anybody who wants to contribute to this idea, please feel free!

I just want to reiterate, this is not a comic reader application i am working on, but an actual comic application ( a self contained comic). I apologize if i have not been clear.
 

jnic

macrumors 6502a
Oct 24, 2008
567
0
Cambridge
imageNamed: returns nil when an image isn't found, so why not just have the artist add all their images to the bundle as "image_n.png", then loop through adding images to an array whilst image != nil, i.e.

Code:
NSMutableArray *array = [NSMutableArray new];

int i = 0;

while (true) {
	NSString *name = [NSString stringWithFormat:@"image_%d.png", i];
	UIImage *image = [UIImage imageNamed:name];

	if (image != nil) {
		[array addObject:image];
	} else {
		break;
	}
}

Then you've got an array of the artist's images, so you can just set the first element of the array as the image for an image view, and overlay a couple of buttons for navigation (increment/decrement the array index and set that image to the view) with some bounds checking on the array.

Slightly hacky but does exactly what you want.
 

jtbullet

macrumors member
Original poster
Jan 19, 2009
30
0
Ok thats a lot to wrap my head around, but I will make a go of the buttons! Thanks so much for the help! Theres going to be a lot of very happy artists in the very near future.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.