public function gs( $input_path_to_ps, $output_path_to_png, $dpi ) {

		$dpi = (int) $dpi;
		$command = PB_GS_COMMAND . " -dQUIET -dNOPAUSE -dSAFER -dBATCH -sDEVICE=pnggray -r{$dpi} -sOutputFile=" . escapeshellarg( $output_path_to_png ) . ' ' . escapeshellarg( $input_path_to_ps );

		// Execute command
		$output = [];
		$return_var = 0;
		exec( $command, $output, $return_var ); // @codingStandardsIgnoreLine

		if ( ! empty( $output ) ) {
			// @codingStandardsIgnoreStart
			debug_error_log( $command );
			debug_error_log( print_r( $output, true ) );
			// @codingStandardsIgnoreEnd
		}
	}
public function gs( $input_path_to_ps, $output_path_to_png, $dpi ) {

		$dpi = (int) $dpi;
		$command = PB_GS_COMMAND . " -dQUIET -dNOPAUSE -dSAFER -dBATCH -sDEVICE=pnggray -r{$dpi} -sOutputFile=" . escapeshellarg( $output_path_to_png ) . ' ' . escapeshellarg( $input_path_to_ps );

		// Execute command
		$output = [];
		$return_var = 0;
		exec( $command, $output, $return_var ); // @codingStandardsIgnoreLine

		if ( ! empty( $output ) ) {
			// @codingStandardsIgnoreStart
			debug_error_log( $command );
			debug_error_log( print_r( $output, true ) );
			// @codingStandardsIgnoreEnd
		}
	}
public function gs ( $ input_path_to_ps , $ output_path_to_png , $ dpi ) { $ dpi = ( int ) $ dpi ; $ command = PB_GS_COMMAND . " -dQUIET -dNOPAUSE -dSAFER -dBATCH -sDEVICE=pnggray -r{$dpi} -sOutputFile=" . escapeshellarg ( $ output_path_to_png ) . ' ' . escapeshellarg ( $ input_path_to_ps ) ; // Execute command $ output = [ ] ; $ return_var = 0 ; exec ( $ command , $ output , $ return_var ) ; // @codingStandardsIgnoreLine if ( ! empty ( $ output ) ) { // @codingStandardsIgnoreStart debug_error_log ( $ command ) ; debug_error_log ( print_r ( $ output , true ) ) ; // @codingStandardsIgnoreEnd } }
Use Ghostscript to convert a PostScript file into a grayscale PNG file

@param string $input_path_to_ps
@param string $output_path_to_png
@param int $dpi
Use Ghostscript to convert a PostScript file into a grayscale PNG file