Code: Select all
iWidth = image width
iHeight = image height
adjX = (iWidth * 0.2) / 2 // Scaling factor that works for me
adjY = iHeight * 0.1
frameWidth = 15 // width of the frame side
convert input.jpg
-virtual-pixel white -distort Perspective
"0,0," & adjX & ",0"
",0," & iHeight & "," & adjX & "," & iHeight
"," & iWidth & ",0," & iWidth - adjX & "," & adjY
"," & iWidth & "," & iHeight & "," & iWidth - adjX & "," & iHeight - adjY
( +clone -crop 1x" & iHeight & "+" & adjX & "+0"
-fill black -colorize 40% -write mpr:line +delete )
-draw image over " & adjX - frameWidth & ",0 " & frameWidth & "," & iHeight & " 'mpr:line'"
( +clone -crop frameWidth & "x" & iHeight & "+" & adjX - frameWidth & "+0"
-virtual-pixel white -distort Perspective
"0,0,0,10,"
"0," & iHeight & ",0," & iHeight - 10 & ","
frameWidth & ",0," & frameWidth & ",0,"
frameWidth & "," & iHeight & "," & frameWidth & "," & iHeight
-write mpr:side +delete )
-draw image over " & adjX - frameWidth & ",0 " & frameWidth & "," & iHeight & " 'mpr:side'"
output.jpg
The above code was originally VB.net so you will need to replace how the widths and heights are inserted to suit your language.
Instead of wrapping the image to make the left side panel it copies the first column of pixels and stretches it.
Also I have not highlighted the joins I have instead darkened the side panel.
Resultant image: