+#elif defined(UNIX_PIPE_TO_PROCESSES)
+
+ string output="png32:"+temp_file;
+
+ pid_t pid = fork();
+
+ if (pid == -1) {
+ return false;
+ }
+
+ if (pid == 0){
+ // Child process
+ if(filename.find("psd")!=String::npos)
+ execlp("convert", "convert", filename.c_str(), "-flatten", output.c_str(), (const char *)NULL);
+ else
+ execlp("convert", "convert", filename.c_str(), output.c_str(), (const char *)NULL);
+ // We should never reach here unless the exec failed
+ return false;
+ }
+
+ int status;
+ waitpid(pid, &status, 0);
+ if( (WIFEXITED(status) && WEXITSTATUS(status) != 0) || !WIFEXITED(status) )
+ return false;
+
+#else
+ #error There are no known APIs for creating child processes
+#endif
+