Sorry, I have a different philosophy. For small little details like this you are unlikely to return to any time soon, just help a brother out.
I do appreciate you making me kick and scream to do this, I did learn something. But it was so far from a priority it was really driving me quite nuts.
Edit: regarding claims to proof: I was going so nuts over this I was pretty convinced you just resized it in a graphics program first just to mess with me ;-)
Ignore icon DPI
Re: Ignore icon DPI
Well, OK. Here you go:Wooden Brain Concepts wrote:For small little details like this you are unlikely to return to any time soon, just help a brother out.
Code: Select all
NSImage *myImage = [NSImage alloc];
myImage = [myImage initWithContentsOfFile:aPath];
NSBitmapImageRep *rep = [myImage bestRepresentationForDevice: nil];
NSSize newSize = { [rep pixelsWide], [rep pixelsHigh] };
[rep setSize: newSize];
NSData *JPEGData = [NSBitmapImageRep representationOfImageRepsInArray:[NSArray arrayWithObject:rep]
usingType:NSJPEGFileType
properties:[NSDictionary dictionaryWithObject:[NSNumber numberWithFloat:1.0]
forKey:NSImageCompressionFactor]];
[GrowlApplicationBridge notifyWithTitle:atitle
description:amsg
notificationName:anotif
iconData:JPEGData
priority:aPrior
isSticky:aStick
clickContext:aClick];
NSString *JPEGPath = [NSTemporaryDirectory() stringByAppendingPathComponent:@"SavedGrowlIcon.jpg"];
[JPEGData writeToFile:JPEGPath atomically:NO];
[[NSWorkspace sharedWorkspace] selectFile:JPEGPath inFileViewerRootedAtPath:@""];
[myImage release];-
Wooden Brain Concepts
- Latté
- Posts: 50
- Joined: Wed Dec 27, 2006 2:37 am
Re: Ignore icon DPI
um thanks... did you see my edit above? i had already got that before you even posted your last reply!
Again thanks.
After I clean up my sample project for applescript I will post in a new thread -- to put into practice my philosophy. ;-)
edit: and i will not make the sticky the default haha
Again thanks.
After I clean up my sample project for applescript I will post in a new thread -- to put into practice my philosophy. ;-)
edit: and i will not make the sticky the default haha
Re: Ignore icon DPI
I didn't, actually. I'm glad you got it working. ☺Wooden Brain Concepts wrote:um thanks... did you see my edit above? i had already got that before you even posted your last reply!
You're welcome.Again thanks.