Page 1 of 1

Difference between canvas: and xc:

Posted: 2010-09-30T09:50:41-07:00
by alansd
Hi,

I only used ImageMagick for converting images to different formats before. I decided to learn more about IM, so the following is the first example I tried:

Code: Select all

convert -size 100x100 canvas:khaki  canvas_khaki.gif
This is from http://www.imagemagick.org/Usage/canvas/#solid.

It does not work! It gives the following error:

convert: no decode delegate for this image format `khaki' @ error/constitute.c/ReadImage/532.
convert: missing an image filename `canvas_khaki.gif' @ error/convert.c/ConvertImageCommand/2970.


However, it is fine if I replace canvas with xc:

Code: Select all

convert -size 100x100 xc:khaki  canvas_khaki.gif
I'm using Ubuntu 10.04, and my IM version is 6.6.2-5.

Can anyone explain the difference?

Thanks!

Alan

Re: Difference between canvas: and xc:

Posted: 2010-09-30T10:06:56-07:00
by fmw42
I believe that the newer canvas: is just an alias to xc: I am not sure why canvas: was introduced except that it is easier and more meaningful name for new users to recognize than xc: So the bottom line is no difference except for the name.

Re: Difference between canvas: and xc:

Posted: 2010-09-30T16:44:10-07:00
by anthony
I checked this with the previous discussion that generated the canvas: image generator.

Yes it is purely an alias for xc: which stood for "X window color", which came from the extreme early days of ImageMagick (long before my time). Of course color is usually a SVN color rather than X window color, so really the original name is rather useless. But that is what it is.

Canvas: is more meaning full (if more verbose), and I will make more use it in new examples, especially if the example uses things what was added after this change.

The documentation on image file formats (psuedo-formats) has already been updated to match this change.
Canvas gets listed first too, whcih is good considering its importance.
http://www.imagemagick.org/script/formats.php#pseudo

Re: Difference between canvas: and xc:

Posted: 2010-09-30T20:07:59-07:00
by Drarakel
Note that you need a newer ImageMagick version in order to use "canvas:". (I think it was included with v6.6.4-6.)
alansd wrote:I'm using Ubuntu 10.04, and my IM version is 6.6.2-5.

Re: Difference between canvas: and xc:

Posted: 2010-10-02T11:02:52-07:00
by alansd
Drarakel wrote:Note that you need a newer ImageMagick version in order to use "canvas:". (I think it was included with v6.6.4-6.)
alansd wrote:I'm using Ubuntu 10.04, and my IM version is 6.6.2-5.
Oh.. I thought I had the latest version. Thanks (all of you)!

Alan

Re: Difference between canvas: and xc:

Posted: 2010-10-02T19:19:54-07:00
by anthony
IM has a very active development group, suprising considering its current small size.

As such lastest is actually even 'newer' than the last point release!!

A lot of action has recently centered on improving the quality of distortion results.
WIth effects to image resize filters, and Variable Blur Mapping.