-virtual-pixel set always to "edge" with distort command

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
sockster
Posts: 6
Joined: 2011-11-07T20:59:48-07:00
Authentication code: 8675308

-virtual-pixel set always to "edge" with distort command

Post by sockster »

Here is my command:

Code: Select all

convert 2.png -alpha set -virtual-pixel checker-tile -distort Perspective '0,0,0,0 0,418,0,300 436,418,350,250 436,0,350,50' output.png
image I used:
Image

what I get:
Image

As you can see my virtual pixels are set to edge.
I've tried other options, like random and transparent with no change.
What am I missing here? Command options order? Do I need something else?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -virtual-pixel set always to "edge" with distort command

Post by fmw42 »

Your command works just fine for me under IM 6.7.3.4 Q16 Mac OSX Tiger.

It might help to know what version of IM you are using and what platform? I suspect it is a version issue. Perhaps some of the virtual-pixel settings were not available in your release for -distort perspective.

What do you see listed from

convert -list virtual-pixel

It it lists checkertile, then perhaps -distort perspective was not sensitive to that option for your release.
sockster
Posts: 6
Joined: 2011-11-07T20:59:48-07:00
Authentication code: 8675308

Re: -virtual-pixel set always to "edge" with distort command

Post by sockster »

I am using Ubuntu Oneiric Ocelot, ImageMagick was installed with apt-get install

Code: Select all

convert --version
Version: ImageMagick 6.6.0-4 2011-06-15 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP 

convert -list virtual-pixel
Background
Black
CheckerTile
Dither
Edge
Gray
HorizontalTile
HorizontalTileEdge
Mirror
Random
Tile
Transparent
VerticalTile
VerticalTileEdge
White
output of apt-cache show imagemagick (pastebin.com)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -virtual-pixel set always to "edge" with distort command

Post by fmw42 »

I am not the expert on -distort, but as it works fine for me with the current release, I have to assume that it is an IM version issue and suggest you upgrade if you can.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: -virtual-pixel set always to "edge" with distort command

Post by anthony »

Are you sure you want Checker-Tile and not Tile? I used Tile as part of my testing when creating the distort functions.

CheckerTile (and other Tile types) was a more recent addition... I added then in IM v6.4.2-6, including some special degenerate color handling for extremes when using distort to "viewing distant horizons".

Never had any problems with it.

A test with "logo:" image works find for me...

Code: Select all

convert logo: -alpha set -virtual-pixel checker-tile \
            -distort Perspective '0,0,0,0 0,418,0,300 436,418,350,250 436,0,350,50' \
            show:
Hmmm you probably should define a background color. If undefined it will default to the background meta-data of the incoming image, which could be jusrt (it only defaults to white only for 'created' images like labels)

Try the simpler examples in
http://www.imagemagick.org/Usage/misc/#checker_tile

These examples reduce the complexity of the operation so we can better see what is happening. It is working fine on my own machine.

Mirror on the other hand did have a bug, in that it only mirrored immediate neighbours, and not the images further way. I personally fixed that bug at the around time I added the newer tile operations. IM v6.5.0-1 See note in
http://www.imagemagick.org/Usage/misc/#mirror
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
sockster
Posts: 6
Joined: 2011-11-07T20:59:48-07:00
Authentication code: 8675308

Re: -virtual-pixel set always to "edge" with distort command

Post by sockster »

anthony wrote:Are you sure you want Checker-Tile and not Tile?
It doesn't matter what I set virtual-pixel to, the output image will always reset it to edge, I tested -background none and coral - neither changes anything.

fmw42 wrote:I am not the expert on -distort, but as it works fine for me with the current release, I have to assume that it is an IM version issue and suggest you upgrade if you can.
Perhaps you know if there Is an official software repository for Ubuntu Oneiric Ocelot?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -virtual-pixel set always to "edge" with distort command

Post by fmw42 »

Perhaps you know if there Is an official software repository for Ubuntu Oneiric Ocelot?
Sorry, no. I am on a Mac and just compile from source.

Can you use one of the unix binaries at http://www.imagemagick.org/script/binary-releases.php otherwise, from source at http://www.imagemagick.org/download/www ... .html#unix


You could try searching with Google:

https://launchpad.net/ubuntu/oneiric/+p ... magemagick
https://launchpad.net/ubuntu/+source/imagemagick
https://help.ubuntu.com/community/ImageMagick
http://ubuntuguide.net/install-imagemag ... untu-linux
Post Reply