[Adium-devl] [Adium-svn] rev 22119 - trunk/Source

Evan Schoenberg evan.s at dreskin.net
Fri Jan 4 18:33:16 UTC 2008


On Jan 4, 2008, at 1:27 PM, Peter Hosey wrote:

> On Jan 04, 2008, at 09:48:19, evands at adiumx.com wrote:
>> +
>> +		//Address book can feed us giant images, which we really don't  
>> want to keep around
>> +		NSSize size = [image size];
>> +		if (size.width > 96 || size.height > 96)
>> +			image = [image imageByScalingToSize:NSMakeSize(96, 96)];
>> 		[image setDataRetained:YES];
>
> I'm pretty sure this defeats the purpose of having  
> setDataRetained:YES there, which was to keep the large data around  
> so that the Contact List doesn't get a blocky image.

The contact list never displays images above 48x48; the only interface  
locations that an image might be displayed as large as 96x96 are the  
contact list tooltip and the user icon toolbar button.  The  
setDataRetained:YES is needed because the image will otherwise keep  
around a much smaller representation - e.g. a 12x12 version after  
drawing itself as an NSMenuItem's image.  Previously,  
setDataRetained:YES could keep around a 1500x1500 image if that was  
supplied by the address book; now it'll keep around at most a 96x96  
image.

Cheers,
Evan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20080104/25a596b4/attachment-0001.html>


More information about the devel mailing list