[Magick-bugs] Bug with large images
Marko Mahnic
marko.mahnic at email.si
Mon Nov 27 03:32:51 CST 2006
omicronpersei8 at imagemagick.org wrote:
>> strange things start happening:
>
> The only way we could investigate is if you sent us a small program that
> illustrates the problem.
>
>
First of all I am using VisualMagick with VC6 on core duo
with 1G ram. Magick version is 6.3.0 11/06/06 Q8.
After one week full time on the problem, I found the problem
but I do not understand it. The ghost lines start to emerge
when I set the density for the image. If I set the density
for the image to 400DPI there is no problem.
If I set it to 600DPI, problems arise. The size of the image
is not important.
Here is an example of how I create the image. I was unable
to prepare the vectors for the example since it is hard
to select the right ones from millions of them.
Magick::Image dc;
dc.colorSpace(Magick::RGBColorspace);
dc.depth(8);
dc.resolutionUnits(Magick::PixelsPerInchResolution);
Magick::Geometry geomImgSize = Magick::Geometry(2672, 2848);
dc.size(geomImgSize);
dc.density ( Magick::Geometry ( 600, 600 ) ); // the offending line
dc.backgroundColor("white");
dc.font ( "Arial" );
dc.fontPointsize ( 12 );
dc.erase();
dc.opacity(OpaqueOpacity);
When drawing the vectors I use push/pop graphic context for
each vector and I set stroke, stroke-width and fill='none'
I converted the vectors to MVG objects and tried to run
convert -density 600 -size 2672x2848 xc:white -fill none -stroke black
-strokewidth 1.2 -draw @tile13.txt tile13.gif
on it but no ghosts appeared. tile13.txt is 200k long and it looks
like this (it does not contain push/pop context calls):
path '
M 2718.000,2364.000
L 2664.000,2298.000
'
path '
M 2698.000,2325.000
L 2671.000,2292.000
'
path '
M 2440.000,3012.000
L 2465.000,2989.000
L 2489.000,2966.000
L 2513.000,2944.000
L 2540.000,2926.000
L 2567.000,2907.000
L 2594.000,2889.000
...
Some vectors/arcs extend past the size of the image. I guess they
are clipped by imagemagick. Some arcs define slight curvatures
that get translated into mvg objects like
ARC -37406.000,5853.000 19287.000,-50840.000 -321.287,-318.996
The coordinates are way outside of the image boundaries. I thought
this was causing the ghosts to appear. But then I changed the program
to render only straight lines and the problem was still there.
Marko Mahnič
More information about the Magick-bugs
mailing list