Create a 3d-box like effect on regular image

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
conf
Posts: 2
Joined: 2012-07-24T11:33:38-07:00
Authentication code: 15

Create a 3d-box like effect on regular image

Post by conf »

Hello, guys.
I'm trying to make a 3d-box like effect (don't know how it's called correctly), similar to what raise is doing, so image would look like this:
Image

So what I tried to do:

Having this base image:
Image

I made

Code: Select all

 convert bath.jpg -gravity southwest -splice 25x25 -raise 25 -chop 25x25 framed.jpg 
and got this:
Image

So, as you can see, it's almost what I need excepting bottom right corner, which should be cropped up-right or smth. How I can do it? Crop works only on rectangular basis. Or maybe there's an easier way to do whole effect?
Thank you.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Create a 3d-box like effect on regular image

Post by Bonzo »

I am sure I posted on the forum about this but here is a link to a php version on my website: Canvas print effect
conf
Posts: 2
Joined: 2012-07-24T11:33:38-07:00
Authentication code: 15

Re: Create a 3d-box like effect on regular image

Post by conf »

Thank you very much! Exactly what I need.
The script didn't run from the box, though, I had to make some changes:
1) Add escapeshellcmd around all the $cmd variable
2) Changed in the first $cmd "-write right.miff +delete null:" to "right.miff", because it didn't work that way.
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Create a 3d-box like effect on regular image

Post by Bonzo »

I am glad it works and it was more an example and had no security!

It is funny that on some machines the null: is required and on others it causes a problem.
Post Reply