Allow me to be honest. Every time I see a question and GMT5… I more or less loose interest in the question. If users don’t wan to bother to update and see if the problem was solved meanwhile, why should we care?
Sorry, i understend my fault. I’ll try to be more specific
My goal is to draw an administrative boundary from DCW and remove some small details. But coast -A parameter removes only coastline objects.
I updated ghostscript to 10.00 and use GMT 6.3.0
It’s my new codes and the result. It’s not changed
set rj=-Jx4.d/4.d -R26.5/29/59/61
gmt begin eu ps
gmt set PS_PAGE_COLOR 255/255/255 MAP_FRAME_TYPE inside
gmt plot %rj% len.gmt -G255/255/255
gmt coast %rj% -Di -W1p,black -ERU.LEN+p.5,blue -BWESN -Ba2.5f1g1 -A4000
gmt end
gswin64c -sDEVICE=pngalpha -dBackgroundColor=16#ffffff -dNOPAUSE -dSAFER -sOutputFile=image2.png -- eu.ps >>nul:
Why GMT6.3.0 and not the latest GMT6.4.0?
Anyway Gostscript10 introduced a new bug in GMT regarding transparency. Options are: downgrade GS to 9.xxx or use a the GMT developer version. For Windows you can use this
Many thanks, Joaquim for your generous help. I’ve tried
6.5.0 GMT version
previous GS version (9.55)
pcconvert (>gmt psconvert eu.ps -GC:\tools\gs\gsx.xx\bin\gswin64c -A -TG)
Unfortunately still no changes. It was expected and it was initially the bad idea
“untouched regions are transparent” as it written in docs.
Then I’ve got two other questions: it is possible in begin sentence
to output indexed raster (8-bits) file (bmp256/png256)?
to set pngalpha format (and BackgroundColor color)?
gmt begin eu png TG or C-sDEVICE=png256 or C-dBackgroundColor=16#ffffff not works
gmt psconvert eu.ps -Tg -C-sDEVICE=png256 not works too
Joaquim , thank you once again
I found Caspian sea boader in DCW 6th version. It was my another headache.
I’m using -G for testing different GS versions
i’ve trouble with GMT 6th version In conjunction with Powershell
Regarding the rest
i found in docs that my problem has no solution.
Maybe, “for general education”. What is the reason for the restriction “untouched regions are transparent”. It is possible to assign control of transparency, to assign transparency to a specific color.
Sorry to worried you. But you really helped
as to GMT psconvert. It’s easy
It was my attempt to use psconvert with my option - 8-bit png output file.
Canonnical GS code uses -sDEVICE to set the indexed format (gswin64c -sDEVICE=png256 …)
So i used -C parameter psconvert (GS_option) to pass it on to GS
psconvert ss1.ps -C-sDEVICE=png256
but output png file still has truecolor data. I belive that psconvert can’t convert any PS file to 8-bit indexed png file
Hi Alexander, if I understand you right you would like to plot some polygons on top of other things and assign the color of those polygons to be transparent. This would basically punch a hole in the plot in those polygons as the PNG will be transparent there. Is that what you want? I did an experiment of plotting a red square and then overlaying a smaller yellow at 100% transparency and of course all we get is the red square. So that is how it works. I think post-processing of an image might be simpler.
Yes, GMT doesn’t work well in powershell. We don’t know why, but it should be equal for both GMT 5 & 6.
Please, you have to help us more. I still didn’t understand what is your problem. And yes, sure we can assign a color with transparency. Gallery has one such example.
… I’m seeing that Paul also replied and probably understood your issue better than me but I’ll send my questions.
That’s all i want to get. The final image consists of the coastline and administrative boundaries. The image must be salted over another image in the web page. The image on the page is like a layered cake made up of layers of different information. This one and all is similar to a GIS application.
And yes, i made a post-processing sequence with nconvert (xnview)
Thank you all
Maybe the topic can be closed
There’s a new trouble in PS_MEDIA WxH parameter in GMT 6th version. I think this theme deserves a separate thread.
Hi, Esteban
You offer a working and popular solution, thank you.
I chose post-processing. it’s is more versatile, simply and good looking for me. This crutch came useful