How to convert an image into cylinderical image usng imagemagic?

A plethora of command-line scripts that perform geometric transforms, blurs, sharpens, edging, noise removal, and color manipulations.
imran_ullah
Posts: 3
Joined: 2019-03-03T03:46:13-07:00
Authentication code: 1152

Re: How to convert an image into cylinderical image usng imagemagic?

Post by imran_ullah »

On my directory the displace.png is generated only but then the script aborts. I also want to know why do I need the displace.png?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How to convert an image into cylinderical image usng imagemagic?

Post by snibgo »

Your question is vague.

What version of IM, on what platform? What script are you using? What is your exact command? What are your input images?
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to convert an image into cylinderical image usng imagemagic?

Post by fmw42 »

What is the revision version of the script. It is at the top of the script. The current version is dated 12/31/2018.

What is your exact version of ImageMagick 6.8.x.x. Use convert -version. Nevertheless, 6.8 is rather old.

Since you are using -m vertical, the script should never get to line 933, which is used when -m horizontal is set. So I do not know what is happening.

I think that error might be coming from your OS and not ImageMagick. Do you have enough space in your /tmp directory. Perhaps it is filling and ImageMagick crashes due to too little space to work. How big is your image? Can you post a link to your image here?

The displacement image is created by the script to control the actual warping. See https://imagemagick.org/Usage/mapping/# ... ement_maps and https://imagemagick.org/Usage/mapping/# ... e_cylinder where a simpler form of the cylinderize is shown. Perhaps that code will be all that you need.
dattran92
Posts: 1
Joined: 2019-09-02T03:09:20-07:00
Authentication code: 1152

Re: How to convert an image into cylinderical image usng imagemagic?

Post by dattran92 »

I have the same problem which imran_ullah. It would be really nice if you can help!

My imagemagick Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
My OS version: Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-43-generic x86_64)
The script version is: Developed by Fred Weinhaus 5/1/2009 .......... revised 12/31/2018

I tried using different image, event the 'sharks.jpg' from your example but still have the same problem. I also tried different argument for testing but It's also the same. Here are some of my commands that I used:

Code: Select all

./cylinderize -m vertical sharks.jpg a.png
./cylinderize -m horizontal sharks.jpg a.png
./cylinderize -m vertical -r 73 -l 120 -w 90 -p 5 -n 94 -e 2 -a 100 -v background -b none -f none -o +24+10 sharks.jpg a.png
The error is:

Code: Select all

./cylinderize: line 933:  6210 Aborted                 convert $tmpA1 $flipping $rotating $outfile
After digging deeper, I have some more information for you. The actual line of code generating error is the line 829 " convert $tmpA1 $flipping $rotating $outfile".

After debugging, I have saved the tmpA1 file and try running the command separately. In which,

the $tmpA1 file ('./cylinderize_1_13475.mpc') has content

Code: Select all

id=MagickCache
magick-signature=1018107213
class=DirectClass  colors=0  matte=False
columns=1600  rows=1200 depth=8
colorspace=sRGB
compression=JPEG  quality=92
gravity=Center
rendering-intent=Perceptual
gamma=0.454545
red-primary=0.64,0.33  green-primary=0.3,0.6  blue-primary=0.15,0.06
white-point=0.3127,0.329
profile:exif=106
date:create=2019-09-02T19:33:22+07:00
date:modify=2019-09-02T19:33:22+07:00
exif:ExifImageLength=1200
exif:ExifImageWidth=1600
exif:ExifOffset=58
exif:ExifVersion={48, 50, 50, 48}
exif:Software=Google
exif:YCbCrSubSampling={2, 2}
jpeg:colorspace=2
jpeg:sampling-factor=2x2,1x1,1x1
And the command convert -debug ./cylinderize_1_13475.mpc a.png resulted error:

Code: Select all

convert-im6.q16: unrecognized event type `./cylinderize_1_13475.mpc' @ error/convert.c/ConvertImageCommand/1226.
Please let me know which information you need so I can provide you more. Thanks a lots!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to convert an image into cylinderical image usng imagemagic?

Post by fmw42 »

@dattran92. Please see the private message I sent you on this server.
Post Reply