で指定したディレクトリパスに保存:は、画像のサイズを変更し、私が選択した画像のサイズを変更しようとすると、特定のパスに保存したいのです、このコードを使用してココア
-(void)processImage:(NSString*)inputPath:(int)imageWidth:(int)imageHeight:(NSString*)outputPath {
NSImage * img = [NSImage imageNamed:inputPath];
[img setSize: NSMakeSize(imageWidth,imageHeight)];
}
-(void)startProcessingImages {
int i; // Loop counter.
// Loop through all the files and process them.
for(i = 0; i < [files count]; i++)
{
inputFilePath = [[files objectAtIndex:i] retain];
NSLog(@"filename::: %@", inputFilePath);
// Do something with the filename.
[selectedFile setStringValue:inputFilePath];
NSLog(@"selectedFile:::: %@", selectedFile);
}
NSLog(@"curdir:::::%@", inputFilePath);
NSString *aString = [[NSString stringWithFormat:@"%@%@%@", thumbnailDirPath , @"/" , fileNameNumber] retain];
fileNameJPG = [[aString stringByAppendingString:@".jpg"] retain];
[self processImage:inputFilePath: 66 :55 :thumbnailDirPath];
[self processImage:inputFilePath: 800 :600 :thumbnailDirPath];
[self processImage:inputFilePath: 320 :240 :thumbnailDirPath];
}
私の問題は、私はないですですそれをthumbnailDirPathに保存する方法を知っています。