I am trying to place images (png) on top of a map using the set pixmap
command.
It does work but the transparency of the png is not getting "displayed", and I get a white background instead.
Can the pixmap
feature handle the transparency property of an image?
Here is the script:
$DATA<<EOD
1,"Washington",630.2000,1591.1800
EOD
$DATA01<<EOD
1 "C:\\Temp\\Images\\colors.png" 630.2000 1591.1800
EOD
set datafile separator comma
set style data point
set term windows enhanced size 3000.00,2000.00
unset xtics; unset ytics; unset x2tics; unset y2tics
set grid noxtics
set grid noytics
set border 0
set colorsequence classic
set key off
set for [i=1:1] pixmap i word($DATA01[i], 2) center at word($DATA01[i], 3), word($DATA01[i], 4) width 100 height 100
plot 'C:\Magic\XPA\46s\Add_On\ChartGenerator\Geography\USA_Curved_Names_Blue.png.jpg' binary filetype=JPG w rgbimage,\
$DATA every ::0::0 using ($3):($4) notitle,\
$DATA using ($3):($4):($2) with labels font "Tahoma,20" textcolor rgb "purple" center offset 0,1 notitle
Roberto
I do not know what is going on here exactly, but it has something to do with the image file itself. If I open that file in GIMP and export it to a new file with no intervening edit/modify operations, then the exported file works correctly as a pixmap with transparent areas.
Comparing the output of
identify -verbose original.png
andidentify -verbose redo.png
doesn't show anything that stands out to me except possibly thepng:IHDR.color_type
entries.I attach the re-exported file here - try it in place of your original image file and see if that works.
For what it's worth, here is the diff between
identify
run on the two files:If you spot anything relevant there, let me know. If it's a reproducible file property that can be tested for, maybe gnuplot can be taught to fix it or at least emit a warning.