objective c - NsWorkspace iconForFile returns image of low quality -
i'm using iconforfile: selector of nsworkspace class, returns image of low quality.
can tell me why happening? there switch or flag framework return image in different format...
the docs state returned icon's size 32x32, can use -[nsimage setsize:]
, may load larger representation:
nsimage * iconimage = [[nsworkspace sharedworkspace] iconforfile:file]; [iconimage setsize:nsmakesize(128, 128)];
you can use icon services (e.g. geticonreffromfileinfo
) or quicklook (e.g. qlthumbnailimagecreate
) file's icon or preview icon @ larger size.
Comments
Post a Comment