public function findBestForSize($w, $h)
    {
        $bestBitCount = 0;
        $best = null;
        foreach ($this->images as $image) {
            if ($image->width == $w && $image->height == $h && ($image->bitCount > $bestBitCount)) {
                $bestBitCount = $image->bitCount;
                $best = $image;
            }
        }
        return $best;
    }