Virtual pixel

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Virtual pixel

Post by snibgo »

Code: Select all

convert -list list
shows "VirtualPixel".

Code: Select all

convert -list VirtualPixel
shows "Background", "Black" and the other possible values.

Code: Select all

convert -VirtualPixel ...
doesn't work, because the keyword needs to be "virtual-pixel", with a hyphen.

I suggest that the "-list" documentation is adjusted to include the hyphen.
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: Virtual pixel

Post by fmw42 »

It already works that way (at least on my Mac IM 6.8.6.8 Q16):


convert -list virtual-pixel
Background
Black
CheckerTile
Dither
Edge
Gray
HorizontalTile
HorizontalTileEdge
Mirror
None
Random
Tile
Transparent
VerticalTile
VerticalTileEdge
White

Many hyphenated words can also be specified without the hyphen or with an underscore. But not all. The compose methods work that way. But for example %[standard-deviation] needs hyphen while %[fx:standard_deviation] needs underscore.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Virtual pixel

Post by snibgo »

Yes. I couldn't remember if virtual pixel needed a hyphen or not, so I used "-list list" to find out. It lied to me, showing "VirtualPixel" but not "Virtual-pixel".

On a general note, it would be neat if these double-word keywords could be standardised so they all worked the same way.
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: Virtual pixel

Post by fmw42 »

I do think -list list lied. It just reported one form.

All three forms (hyphen, nothing, underscore) seem to work using -list (on virtual-pixel, virtualpixel, virtual_pixel).

However when actually using -virtual-pixel, that seems to be the only form that works (-virtualpixel and -virtual_pixel error). Seems like it would be reasonable to make virtual pixel allow all three forms, since it is done for -compose methods. But I do not know what is really at issue.

There are I believe possible reasons for the standard deviation differences in string formats and fx escapes, but I do not recall. If there are none, then I would agree to fix it so that it also works all 3 ways above.

Magick would have to comment.
Post Reply