Indexing improvements for sparse images