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 2017/12/08 16:24:00 UTC

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

    [ https://issues.apache.org/jira/browse/SOLR-8197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16283793#comment-16283793 ] 

Neil Ireson commented on SOLR-8197:
-----------------------------------

Is there any chance this could get considered for inclusion into the code. At the moment every time I update my Solr I have to recompile the distribution with this patch.

It's a small change and as far as I can see it doesn't really have any negative impact. If you wanted to maintain the current visual result you can display the PNG on a black background.

N

> Make zero counts in heatmap PNG transparent
> -------------------------------------------
>
>                 Key: SOLR-8197
>                 URL: https://issues.apache.org/jira/browse/SOLR-8197
>             Project: Solr
>          Issue Type: Improvement
>            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