ImageMagick v6 Examples --
Testing for Minor Bugs

Index
ImageMagick Examples Preface and Index
Known and Fixed Bugs Index
These examples are quick tests, with little or no explanation, to check on whether a specific known, but simple, bug has been fixed or not in the last version of IM. As such whenever a new release of IM is downloaded, this page is automatically re-generated to test the current status of the bug in question.



Quantization of CMY colorspace does not work

The CMY colorspace does not have the problems of CMYK has by having a black channel, as such it should be able to quantize in CMY colorspace. However it is quantizing the image in RGB colorspace, and not in CMY colorspace.

  convert colorwheel.png   -quantize CMY   +dither -colors 16 \
          -fill black -gravity SouthWest -annotate 2,2 'CMY' \
          quantize_CMY.gif
[IM Output]

The point of having a CMY color space is that you can then quantize the color in that color space then convert it to CMYK, and have a good color reducion result.


Softlight is better, but not right

The softlight 'dark' is doing EXACTLY the same as for 'light' colors.
For example....

  convert -size 46x70 gradient: -rotate 90 \
          -ordered-dither threshold,3   grayscale_3.gif
  composite grayscale_3.gif  rose: -compose softlight  compose_softlight_2.gif
[IM Output]
[IM Output]

This does not correlate with the results I see from the SVG Alpha Composition Documentation, which shows definate darkening for a dark color overlay.


Combine fails for 'other' colorspaces


  convert rose: -colorspace HSB -separate rose_HSB_%d.gif
  convert rose_HSB_?.gif -colorspace HSB -combine \
               -colorspace RGB  rose_HSB_combined.gif
[IM Output]

The current work around, is this (not very nice)...

  convert rose_HSB_0.gif -colorspace HSB \
          rose_HSB_0.gif -compose CopyRed   -composite \
          rose_HSB_1.gif -compose CopyGreen -composite \
          rose_HSB_2.gif -compose CopyBlue  -composite \
          -colorspace RGB   rose_HSB_combined_2.gif
[IM Output]

But this should be built in. Probably by converting the greyscale images back to a 'Gray' image to combine into an image of the same colorspace of the first image.


CopyBlack can not handle a RGB greyscale channel image

The above 'workaround' fails for CMYK images...

  convert rose: -colorspace CMYK -separate rose_CMYK_%d.gif
  convert rose_CMYK_0.gif -colorspace CMYK \
          rose_CMYK_0.gif -compose CopyCyan    -composite \
          rose_CMYK_1.gif -compose CopyMagenta -composite \
          rose_CMYK_2.gif -compose CopyYellow  -composite \
          rose_CMYK_3.gif -compose CopyBlack   -composite \
          -colorspace RGB   rose_CMYK_combined.gif
[IM Output]

It seems "CopyBlack" is just getting 'black' or MaxRGB value, when the given image that does not contain a black channel. Which is basically any non-CMYK image. It should treat a non-CMYK image as a RGB greyscale image to bring it in line with what "CopyOpacity" does when no matte channel is available.

Current workaround is to is to use "-fx" to transfer the values from the RGB greyscale image to the black channel. This is very slow however.

  convert rose_CMYK_0.gif -colorspace CMYK \
          rose_CMYK_0.gif -compose CopyCyan    -composite \
          rose_CMYK_1.gif -compose CopyMagenta -composite \
          rose_CMYK_2.gif -compose CopyYellow  -composite \
          rose_CMYK_3.gif -channel K -fx v.r +channel \
          -colorspace RGB   rose_CMYK_combined2.gif
[IM Output]

WARNING: Even the workarounds for CMYK is now failing!!.


Long Term Minor Bugs and Problems

These are known bugs, that will probably take some time to figure out and fix.


Semi-transparent, round end caps

Semi-transparent strokes with end caps produce a extra overlay when it shouldn't.

    convert -size 100x60 xc:skyblue \
            -fill white -stroke '#0004' -strokewidth 16 \
            -draw "stroke-linecap round       path 'M 60,30 L -10,30'" \
            draw_endcap.gif
[IM Output]

The line in the middle is the white fill for this single line.

I could not find any other problems for other end caps, or for round linejoins.


MVG: diagonal lines are too thick!

A slanted diagonal line appears to be a reasonable thickness

    convert -size 100x60 xc:skyblue -fill white -stroke black \
            -draw "path 'M 10,10 L 90,10 L 90,50 Z'" \
            draw_path_line_closed.gif
[IM Output]

But the line appears to be much thicker when draw as a dashed line.

    convert -size 100x60 xc:skyblue -fill white -stroke black \
            -draw "stroke-dasharray 3 3 33 3 3 3 \
                   path 'M 10,10 L 90,10 L 90,50 Z'" \
            draw_path_dash_closed.gif
[IM Output]


Created: 18 August 2005
Updated: 14 June 2007
Author: Anthony Thyssen, <A.Thyssen@griffith.edu.au>
Examples Generated with: [version image]
URL: http://www.imagemagick.org/Usage/bugs/testing/