You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Neil Ireson (JIRA)" <ji...@apache.org> on 2015/10/23 23:37:28 UTC

[jira] [Created] (SOLR-8197) Make zero counts in heatmap PNG transparent

Neil Ireson created SOLR-8197:
---------------------------------

             Summary: Make zero counts in heatmap PNG transparent
                 Key: SOLR-8197
                 URL: https://issues.apache.org/jira/browse/SOLR-8197
             Project: Solr
          Issue Type: Improvement
    Affects Versions: 5.3
            Reporter: Neil Ireson
            Priority: Minor


It would be useful to have transparent zero values so that I can overlay the image as a layer on a map.

The change just requires altering two methods in SpatialHeatmapFacets.java as follows:

{code}
static void writeCountAtColumnRow(BufferedImage image, int rows, int c, int r, int val)
{
      image.setRGB(c, rows - 1 - r, val == 0 ? 0 : val ^ 0xFF_00_00_00);
}

static int getCountAtColumnRow(BufferedImage image, int rows, int c, int r)
{
      int val = image.getRGB(c, rows - 1 - r);
      return val == 0 ? 0 : val ^ 0xFF_00_00_00;
}
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org