Page 1 of 1

problem with 3Dbox

Posted: 2012-07-28T03:49:18-07:00
by capncrunch9834
( ImageMagick 6.7.7-6 2012-06-03 Q16 )
I'm not sure where this is going wrong but when I use the 3D Box set example as a windows commandline like this...

Code: Select all

convert -virtual-pixel transparent ( "tmp_spine.jpg" -matte  +distort Perspective  "0,0 -30,20  0,200 -30,179  39.5,200 0,200  39.5,0 0.5,0" ) ( "tmp_front.jpg" -matte  +distort Perspective "0.5,0 0.5,0  0.5,200  0.5,200  150,200 100,156  150,0 100,30" ) -background black -layers merge  +repage  -bordercolor black -border 15x2 "3Dbox.png"
this is the result...

Image

I also tried...

Code: Select all

convert "tmp_spine.jpg" -virtual-pixel background  -background none +distort Perspective "0,0 -40,20  0,199 -40,179  39,199 0,199  39,0 0,0" ( "tmp_front.jpg"  +distort Perspective "0,0 0,0  0,199 0,199  149,199 99,169  149,0 99,30"  ) -background none -layers merge +repage -trim  "3Dbox.png"
and this is the result...

Image

I haven't yet figured out why it is "smeared" at the top & bottom, and not being trimmed. Any help would be appreciated.

Thanks

Re: problem with 3Dbox

Posted: 2012-07-28T10:17:17-07:00
by capncrunch9834
I should probably clarify that this came directly from the example in the docs at...

http://www.imagemagick.org/Usage/distorts/#box3d

and an edit of the script from this site...

http://www.rubblewebs.co.uk/imagemagick ... example=20


For me, both leave a smear at the top & bottom as I have shown above. What is causing this?

Re: problem with 3Dbox

Posted: 2012-07-28T10:48:53-07:00
by fmw42
I found the same problem yesterday in my script, 3Dbox, and fixed it. I reported this as a bug and then withdrew it, since the fix was easy. See viewtopic.php?f=3&t=21530. Perhaps I withdrew my bug report prematurely, if you are having similar problems with Anthony's example. You will need to wait to hear from him. I sent him PM about this.

P.S. You can fix this issue the same as I did by moving -virtual-pixel transparent inside each paren just before +distort.