Page 1 of 1
Problem converting .mac files
Posted: 2014-05-17T12:28:19-07:00
by Jason S
Using most any .mac (Macpaint) file, such as
this one...
This does not work for me. I get an all-black image.
But this works:
Some target formats work (PNG, BMP, MIFF), and others don't (TIFF, JPEG, PBM), with no obvious pattern.
[Version: ImageMagick 6.8.9-1 Q16 x86_64 2014-05-17, Features: DPC OpenMP]
Re: Problem converting .mac files
Posted: 2014-05-17T12:38:54-07:00
by snibgo
It converts fine for me, IM v6.8.9-0 on Windows 8.1, giving pictures of two cats, drawn with black pixels on a white background.
However, "identify -verbose cats.mac" claims it has only black pixels:
Code: Select all
Image: cats.mac
Format: MAC (MAC Paint)
Class: PseudoClass
Geometry: 576x720+0+0
Units: Undefined
Type: Bilevel
Base type: Bilevel
Endianess: Undefined
Colorspace: Gray
Depth: 1-bit
Channel depth:
gray: 1-bit
Channel statistics:
Gray:
min: 0 (0)
max: 0 (0)
mean: 0 (0)
standard deviation: 0 (0)
kurtosis: 0
skewness: 0
Colors: 1
Histogram:
414720: ( 0, 0, 0) #000000 gray(0)
Colormap entries: 2
Colormap:
0: ( 0, 0, 0) #000000 gray(0)
1: (255,255,255) #FFFFFF gray(255)
Rendering intent: Perceptual
Gamma: 0.454545
Chromaticity:
red primary: (0.64,0.33)
green primary: (0.3,0.6)
blue primary: (0.15,0.06)
white point: (0.3127,0.329)
Background color: gray(255)
Border color: gray(223)
Matte color: gray(189)
Transparent color: gray(0)
Interlace: None
Intensity: Undefined
Compose: Over
Page geometry: 576x720+0+0
Dispose: Undefined
Iterations: 0
Compression: Undefined
Orientation: Undefined
Properties:
date:create: 2014-05-17T20:32:31+01:00
date:modify: 2014-05-17T20:32:17+01:00
signature: 19892baa96112082ecc7fc436c1259ffea83303327ee04eda98c966ee302815b
Artifacts:
filename: cats.mac
verbose: true
Tainted: True
Filesize: 5.76KB
Number pixels: 415K
Pixels per second: 9.223372EB
User time: 0.000u
Elapsed time: 0:01.000
Version: ImageMagick 6.8.9-0 Q16 x64 2014-04-06 http://www.imagemagick.org
Re: Problem converting .mac files
Posted: 2014-05-17T12:52:38-07:00
by fmw42
[Version: ImageMagick 6.8.9-1 Q16 x86_64 2014-05-17, Features: DPC OpenMP]
Show the list of delegates. You may be missing libtiff, libjpeg,etc. Did you install from source or from binary? If from source, you must successfully install all needed delegates before installing IM.
Re: Problem converting .mac files
Posted: 2014-05-17T13:06:49-07:00
by Jason S
valgrind reports a number of "Conditional jump or move depends on uninitialised value" issues when I convert a .mac file. If that's related, there may well be some randomness to it. (But for me, it seems completely deterministic on three completely different platforms with three completely different versions of IM.)
PBM format doesn't use a delegate, but anyway:
I installed from source.
Delegates: bzlib djvu fontconfig freetype jng jpeg lcms lqr openexr pangocairo png tiff webp x xml zlib
Re: Problem converting .mac files
Posted: 2014-05-17T14:18:25-07:00
by fmw42
I think there is something odd about your uploaded file. I cannot download it except as text format and Preview won't open it. If I open it in Safari, it launches quicktime and shows a completely black image. Can you upload it as a zipped file for better downloading or use dropbox.com?
Re: Problem converting .mac files
Posted: 2014-05-21T13:34:44-07:00
by Jason S
I propose this patch. It seems to fix it for me, at least.
Code: Select all
--- a/ImageMagick-6.8.9-1/coders/mac.c 2013-12-01 14:47:50.000000000 +0000
+++ b/ImageMagick-6.8.9-1/coders/mac.c 2014-05-21 17:59:00.393848099 +0000
@@ -244,6 +244,7 @@
}
}
pixels=(unsigned char *) RelinquishMagickMemory(pixels);
+ (void) SyncImage(image);
(void) CloseBlob(image);
return(GetFirstImageInList(image));
}