POV-Ray : Newsgroups : povray.animations : Post_Frame_Command trouble Server Time: 23 Jul 2019 11:01:33 GMT
  Post_Frame_Command trouble (Message 1 to 4 of 4)  
From: CAD-Andi
Subject: Post_Frame_Command trouble
Date: 26 Oct 2010 21:50:00
Message: <web.4cc74ccefeaab192bf952ed30@news.povray.org>
Hi!

I'm trying to automatically crop an image after rendering it using "mogrify"
from image magick. Here is my ini file:

Width=1920
Height=1080
Antialias=Off
Input_File_Name="./test.pov"
Output_File_Name="testanim"
Initial_Frame=0
Final_Frame=10
Subset_Start_Frame=0
Subset_End_Frame=10
Initial_Clock=0
Final_Clock=10
Post_Frame_Command=mogrify -crop 840x620+540+230 %o
Post_Frame_Return=U

When I use the "mogrify" command by hand in the command line it works fine. When
I run my ini file the image does not get cropped and I get teh message:

Render halted because the post-frame shell-out ('mogrify') requested POV-Ray to
generate a user abort.

Something is wrong with my command and I can't figure it out.

I want to crop the image after rendering because I'm using a fisheye camera
which gives me the closest desired look (distortion) but in a circular image.

Thanks!


Post a reply to this message

From: CAD-Andi
Subject: Re: Post_Frame_Command trouble
Date: 26 Oct 2010 22:00:01
Message: <web.4cc74e914a5b922fbf952ed30@news.povray.org>
"CAD-Andi" <nomail@nomail> wrote:
> Hi!
>
> I'm trying to automatically crop an image after rendering it using "mogrify"
> from image magick. Here is my ini file:
>
> Width=1920
> Height=1080
> Antialias=Off
> Input_File_Name="./test.pov"
> Output_File_Name="testanim"
> Initial_Frame=0
> Final_Frame=10
> Subset_Start_Frame=0
> Subset_End_Frame=10
> Initial_Clock=0
> Final_Clock=10
> Post_Frame_Command=mogrify -crop 840x620+540+230 %o
> Post_Frame_Return=U
>
> When I use the "mogrify" command by hand in the command line it works fine. When
> I run my ini file the image does not get cropped and I get teh message:
>
> Render halted because the post-frame shell-out ('mogrify') requested POV-Ray to
> generate a user abort.
>
> Something is wrong with my command and I can't figure it out.
>
> I want to crop the image after rendering because I'm using a fisheye camera
> which gives me the closest desired look (distortion) but in a circular image.
>
> Thanks!

Ooops, I forgot to say:
I'm Using Windows XP and POV-Ray Version 3.7.0.beta.38.msvc9.win64


Post a reply to this message

From: CAD-Andi
Subject: Re: Post_Frame_Command trouble
Date: 27 Oct 2010 17:25:02
Message: <web.4cc85f7a4a5b922fbf952ed30@news.povray.org>
I just found out a little more about my problem.
I was able to run the following line in my ini file successfully:

Post_Frame_Command=test.bat

Then I want to give the current filename %o as an option to my script like this:

Post_Frame_Command=test.bat %o

Now my test.bat file want's to start (that means C:\WINDOWS\system32\cmd.exe
window opens, but remains black and does not seem to execute the batch file
itself.

Immediately after that it opens the picture that povray just rendered in
IrfanView (which is my preferred Image viewer on XP)
Opening IrfanView is not part of my test.bat script.

It seems like as if povray invoced a second cmd task running only the picture
file name %o which causes XP to open the appropriate program to open it (In this
case IrfanView).

It seems like Povray does not hand %o over to test.bat as an option.
I tried all kinds of possible and impossible syntax variations, all without
success.

Is this a bug? Can anyone help?

Andi


Post a reply to this message

From: Darren New
Subject: Re: Post_Frame_Command trouble
Date: 27 Oct 2010 18:24:38
Message: <4cc86e66$1@news.povray.org>
CAD-Andi wrote:
> Is this a bug? Can anyone help?

cmd.exe actually executes batch files.

Try something like

Post_Frame_Command=cmd.exe /c test.bat "%o"

and see if you get better results?

-- 
Darren New, San Diego CA, USA (PST)
   Serving Suggestion:
     "Don't serve this any more. It's awful."


Post a reply to this message

Copyright 2003-2008 Persistence of Vision Raytracer Pty. Ltd.