Skip to content

Commit

Permalink
[41_5] Fix gs_to_png on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
da-liii authored Oct 10, 2023
1 parent 81864bc commit 013ab21
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Plugins/Ghostscript/gs_utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ gs_executable () {

string
gs_prefix () {
return string ("\"") * gs_executable () * string ("\"") * string (" ");
if (os_win () || os_mingw ()) {
return string ("\"") * gs_executable () * string ("\"") * string (" ");
} else {
return gs_executable () * string (" ");
}
}

static double
Expand Down Expand Up @@ -363,9 +367,7 @@ gs_to_png (url image, url png, int w, int h) { // Achtung! w,h in pixels
}
else {
// don't use -dEPSCrop which works incorrectly if (bx1 != 0 || by1 != 0)
cmd << "-c \" " << as_string (-bx1) << " " << as_string (-by1)
<< " translate gsave \" -f " << sys_concretize (image)
<< " -c \" grestore \"";
cmd << " -f " << sys_concretize (image);
}
string ans= eval_system (cmd);
if (DEBUG_CONVERT) debug_convert << cmd << LF << "answer :" << ans << LF;
Expand Down

0 comments on commit 013ab21

Please sign in to comment.