You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Smiley (JIRA)" <ji...@apache.org> on 2017/12/08 18:18:00 UTC

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

     [ https://issues.apache.org/jira/browse/SOLR-8197?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Smiley updated SOLR-8197:
-------------------------------
    Component/s: spatial

> Make zero counts in heatmap PNG transparent
> -------------------------------------------
>
>                 Key: SOLR-8197
>                 URL: https://issues.apache.org/jira/browse/SOLR-8197
>             Project: Solr
>          Issue Type: Improvement
>          Components: spatial
>            Reporter: Neil Ireson
>            Priority: Minor
>         Attachments: transparency.patch
>
>
> 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.4.14#64029)

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