Pillow with curved lines

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
astroanalyst
Posts: 9
Joined: 2015-04-04T08:26:33-07:00
Authentication code: 6789

Pillow with curved lines

Post by astroanalyst »

I am not a programmer but rather helping my programmer solve this problem.
He currently wrapped an image on a pillow but the image does not follow the contour.
I want it to look like this
https://society6.com/product/vertical-l ... 193&18=126

Notice the lines on the edges bend in but the line in the middle stays straight.

Can anyone give me a clue how what to do so I can inform my programmer?
Thanks.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Pillow with curved lines

Post by fmw42 »

How about you first identify your IM version and platform and then provide your input images. You can post them to some free hosting service such as dropbox.com and put the URL here. Please review viewtopic.php?f=1&t=9620
astroanalyst
Posts: 9
Joined: 2015-04-04T08:26:33-07:00
Authentication code: 6789

Re: Pillow with curved lines

Post by astroanalyst »

Ok I will do that.
For the sake of simplicity... the input images are straight vertical lines.

I'll have to get the IM version.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Pillow with curved lines

Post by fmw42 »

astroanalyst wrote:Ok I will do that.
For the sake of simplicity... the input images are straight vertical lines.

I'll have to get the IM version.
I need to see the exact input image of the pillow and of the pattern you want to put onto the pillow.

Please see my PM to you on this forum.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Pillow with curved lines

Post by snibgo »

This sounds as if you want pincushion distortion, which is the opposite of barrel distortion, eg:

Code: Select all

convert pincin.png -distort Barrel 0,0,-0.4 pincout.png
Tweaking the three parameters may give a closer approximation.
Image
Image
snibgo's IM pages: im.snibgo.com
astroanalyst
Posts: 9
Joined: 2015-04-04T08:26:33-07:00
Authentication code: 6789

Re: Pillow with curved lines

Post by astroanalyst »

That looks pretty good however the boxes on the outside are larger than the boxes on the inside.
If this were a pillow the bulge would be in the middle and that box would appear bigger.
It would be fine if the whole grid had the same size boxes but were slightly bent like you show it.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Pillow with curved lines

Post by fmw42 »

Please see my PM to you on this forum.
astroanalyst
Posts: 9
Joined: 2015-04-04T08:26:33-07:00
Authentication code: 6789

Re: Pillow with curved lines

Post by astroanalyst »

My programmer figured it out... he added more distortion points the edges then bent them.
He will add a total of 20.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Pillow with curved lines

Post by fmw42 »

Please see my new PM to you on this forum.
Post Reply