Average Color (HSL) v1.1 in Plugins - Publishing ONLY! Posted February 6, 2010 Updated. A really bad memory leak has been fixed! See first post for download. I was preallocating a large arraylist to avoid dynamic expansion and associated heap fragmentation, but instead of doing this only once, I was doing it for every region of interest. So I was using the effect on some large non-contiguous selections this morning, obtained by using Segment Image and Magic Wand, and got some out-of-memory errors. I fixed it up immediately and did a little refactoring. It shouldn't run out of virtual memory anymore, and performance is greatly improved (although still not optimal). Other changes: - Effect has been moved to the "Color" sub-menu. - Analysis stage has been moved to OnSetRenderInfo method. The double-checked lock + memory barrier hack isn't necessary unless the effect is built in Code Lab. - Instead of scanning over the selection's bounding box and using the IsVisible test to determine whether a given pixel within the box is actually selected, it now scans over the regions of interest directly, which also improves performance.