Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

withgdal.sh 599 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
  1. #!/usr/bin/env bash
  2. #
  3. GDAL=`gmt grdconvert 2>&1 | grep -c gd`
  4. if [ $GDAL -eq 0 ]; then exit; fi
  5. ps=withgdal.ps
  6. # RGB image. The +b2,1,0 also tests the bands request option
  7. gmt psimage @needle.jpg+b0,1,2 -Dx0/0+w7c -P -Y15c -K > $ps
  8. # Same image as above but as idexed
  9. gmt psimage @needle.png -Dx0/0+w7c -X7.5c -O -K >> $ps
  10. # Convert RGB to YIQ
  11. gmt psimage @needle.jpg -M -Dx0/0+w7c -X-7.5c -Y-7c -O -K >> $ps
  12. # Convert Indexed to YIQ
  13. gmt psimage @needle.png -M -Dx0/0+w7c -X7.5c -O -K >> $ps
  14. # A gray image (one band, no color map)
  15. gmt psimage @vader.jpg -Dx0/0+w4c -X-2.5c -Y4.5c -O >> $ps
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...