Run-time error of type-conflict : “Invalid parameter”.
Error occuring in each example when calling the function “produceGif”.
Constant “imSize” declared “int”.
When calling the member functions “writeGif/writeScaledGif” of the class “ImageWriter”
with effective parameter “imSize” declared “int”.
Formal parameters “sizeX, sizeY” declared “double” (“typedef double T”).
The error persists even if the effective constant is forced from “int” to “T” !!
Surely anybody holds the solution for this trivial question, still unsolved for me !
My compiler version, as for Alexlee, is the cygwin gcc 3.4.4. version.
It is displayed as “/usr/lib/gcc/i686-pc-cygwin/3.4.4” in the “poiseuille.d” file.
Anyway, there is a conflict in “olb-0.5r0” between:
- the (int) imSize in “produceGif”, declared in “poiseuille.cpp” and other examples.
- the (T) sizeX (resp. sizeY) in member “writeScaledGif” of ImageWriter.
See below:
Anyway, there is a conflict in “olb-0.5r0” between:
the (int) imSize in “produceGif”, declared in “poiseuille.cpp” and other examples.
the (T) sizeX (resp. sizeY) in member “writeScaledGif” of ImageWriter.
You’ve got a point here. I’ll check out if the parameters of writeScaledGif should be int instead of T.
But this is unrelated to your problem. The error message
Paramètre non valide - 400x400
is produced by the package ImageMagick. This seems to imply that your version of ImageMagick does not have the same syntax as all versions I’ve previously encountered in my life. It may be an older version, or a newer one, or - that’s a wild guess - a French version which takes French keywords instead of English ones.
Here’s how to check. Start up your Cygwin shell, and change into a directory with a .ppm file, say, pic.ppm. Enter the command
convert -resize 400x400 pic.ppm pic.gif
I expect that you get the same error message as above. Your job now is to find the proper syntax for your version of ImageMagick (“man convert”), and change this correspondingly in the OpenLB source code for ImageWriter. Please tell us what you found, we’re definitely interested!
Hi all!
Just a hint:
The true truth is that Poiseuille worked well the first time! (i.e. it produced the gif images in the .\tmp folder),
but not the second, neither the third, nor the fourth, nor Cylinder2d, nor Bstep2D, and so forth…
But this is unrelated to your problem. The error message “Paramètre non valide - 400x400”
is produced by the package ImageMagick. (…)
Here’s how to check. Start up your Cygwin shell, and change into a directory with a .ppm file, say, pic.ppm.
Enter the command
convert -resize 400x400 pic.ppm pic.gif
So, trying the command:
convert -resize 400x400 teapot.ppm teapot.gif
I got, unfortunately, a wonderful ray-traced teapot setup on a chessboard within a sweet blue background.
Well…, there’s the rub!
Why “Poiseuille” was working well the first time, but not the second neither the third nor the fourth one…?
Type “int” vs “T” was indeed the wrong question.
Sorry! Because I was so glad of the successful issue of “Poiseuille” the first time that I forgot the fact, running it again on the spur of the moment, by double-clicking “poiseuille.exe” in the Windows’ window directory: the fault!!
Advice: remain in the Cygwin environnement when running OpenLB, and keep Windows only for related actions!