Hello,

I'm getting these gcc errors:

macicon.m:29: error: incompatible type for argument 1 of ‘NSMakeSize’
macicon.m:29: error: incompatible type for argument 2 of ‘NSMakeSize’

I have tried using both float and CGFloat in the parameters, and I get the same complaint. Here is my code:

@interface MacIcon:  NSObject

-(int) makeIcon: (NSString *) filePath imagewidth: (float *) width imageheight: (float *)height outputfile:(NSString *)imagePath;


@end

@implementation MacIcon


-(int) makeIcon: (NSString *) filePath imagewidth: (float *) width imageheight: (float*)height outputfile:(NSString *)imagePath {

        
  NSApplicationLoad();
        
  //set up autorelease pool
  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];


  //retrieve the icon
  NSImage *icon = [[NSWorkspace sharedWorkspace] iconForFile:filePath];

  //get bitmap representation of icon
NSBitmapImageRep *resizeicon = (NSBitmapImageRep *)[icon bestRepresentationForDevice:nil];

  //set the icon size
  [resizeicon setSize:NSMakeSize(width, height)];       
  [resizeicon  setPixelsWide:(int*) width];
  [resizeicon setPixelsHigh:(int*)height];


  //convert icon to gif, write to file
[[resizeicon representationUsingType:NSGIFFileType properties:nil] writeToFile:imagePath atomically:NO];


  //release memory
  [icon release];
  [resizeicon release];
  [pool release];
        
                
  return 0;

}

Any suggestions?


--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to