Skip to content

Let PS format be also _cropable_ from modern mode scripts.#8992

Merged
joa-quim merged 1 commit intomasterfrom
crop-PS-in_modern
Apr 20, 2026
Merged

Let PS format be also _cropable_ from modern mode scripts.#8992
joa-quim merged 1 commit intomasterfrom
crop-PS-in_modern

Conversation

@joa-quim
Copy link
Copy Markdown
Member

@joa-quim joa-quim commented Apr 20, 2026

See issue #8979 for reference. AFAIK, cropping ps files from a modern mode script never worked. This PR makes it possible (but not an EPS file) but had to change a default value in gmt_modern.h. We changed

#define GMT_SESSION_CONVERT "A"
to
#define GMT_SESSION_CONVERT ""

Running the tests doesn't reveal any break, but this is nevertheless a somewhat risky change.

Fix #8979

See issue #8979 for reference. AFAIK, cropping ps files from a modern mode script never worked. This PR makes it possible (but not an EPS file) but had to change a default value in `gmt_modern.h`. We changed
#define GMT_SESSION_CONVERT	"A"
to
#define GMT_SESSION_CONVERT	""

Running the tests doesn't reveal any break, but this is nevertheless a somewhat risky change.

Fix #8979
@joa-quim joa-quim requested a review from a team April 20, 2026 13:58
Copy link
Copy Markdown
Member

@Esteban82 Esteban82 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it with the following script:

#!/bin/bash
gmt begin test ps,png A,E720,I+m0.1i -C
gmt basemap -R-2/2/-2/2 -JX5i/5i -BNSEW -Bpxa1 -Bpya1 -Xc -Y3.25i 
gmt end show
rm -f gmt.conf gmt.history

and I obtained both a cropped PS and PNG.

@Esteban82 Esteban82 added enhancement Improving an existing feature add-changelog Add PR to the changelog labels Apr 20, 2026
@joa-quim joa-quim merged commit cbe1b89 into master Apr 20, 2026
11 of 14 checks passed
@joa-quim joa-quim deleted the crop-PS-in_modern branch April 20, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add-changelog Add PR to the changelog enhancement Improving an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Difference between begin and psconvert for pngs

2 participants