-(void) captureScreenImage
{
NSAutoreleasePool *pool = [[NSAutoreleasePoolalloc] init];
if (isPortrait_)
{
UIGraphicsBeginImageContextWithOptions(CGSizeMake(kSmallSrollViewPortWidth, kSectionPortHeight*rowNums+(rowNums-1)*kGapHeight),YES,1.0);
}
else
{
UIGraphicsBeginImageContextWithOptions(CGSizeMake(kSmallSrollViewWidth, kSectionHeight*rowNums+(rowNums-1)*kGapHeight),YES,1.0);
}
[smallScrollView_.layerrenderInContext:UIGraphicsGetCurrentContext()];
smallScrollView_.layer.contents =nil;
UIImage *smallImage =UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
NSString *firstSmallPngPath;//= [NSHomeDirectory() stringByAppendingPathComponent:kSmallImageHoriz];
if (isPortrait_)
{
firstSmallPngPath = [NSHomeDirectory()stringByAppendingPathComponent:kSmallImagePort];
}
else
{
firstSmallPngPath = [NSHomeDirectory()stringByAppendingPathComponent:kSmallImageHoriz];
}
[UIImagePNGRepresentation(smallImage)writeToFile:firstSmallPngPath atomically:YES];
[pool release];
}