Page 1 of 1

Virtual pixel

Posted: 2013-08-06T12:22:18-07:00
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.

Re: Virtual pixel

Posted: 2013-08-06T15:28:25-07:00
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.

Re: Virtual pixel

Posted: 2013-08-06T15:54:54-07:00
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.

Re: Virtual pixel

Posted: 2013-08-06T16:23:33-07:00
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.