Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: PCL to PNG Conversion error

$
0
0
Hi there,
I am trying to convert a PCL file into a PNG (or any image format really).
However I keep getting an "AccessViolationException" when I attempt to open my pcl file through Magick.NET.
This is a WPF application being built in Visual Studio 2013.
I am using the x86 version of Magick.Net
I have ghostscript installed, I have the C++ redistributable installed.

I have tested converting other image file types, so I know the tool works, but when I attempt a PCL file it fails with that exception.

Any help you can provide would be fantastic.

Thank you!


Here is my code:
var settings = new MagickReadSettings {Format = MagickFormat.Pcl};
var pclToBmp = new MagickImage(@"C:\Projects\PCLTest.pcl", settings);
pclToBmp.Write(@"C:\Projects\temp.png");
and here is the exception detail and stack trace
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

at Magick.Image.read(Image* , basic_string<char\,std::char_traits<char>\,std::allocator<char> > )
at ImageMagick.MagickReader.Read(Image
image, String fileName, MagickReadSettings readSettings)
at ImageMagick.MagickImage..ctor(String fileName, MagickReadSettings readSettings)
<..the remainder of the stack is my code..>

And here is the debug output from Magick.Net

2014-06-27T11:19:29-05:00 0:00.031 0.047u 6.8.8 Policy Magick[5408]: policy.c/IsRightsAuthorized/574/Policy
Domain: Path; rights=Read; pattern="C:\Projects\PCLTest.pcl" ...

2014-06-27T11:19:29-05:00 0:00.054 0.063u 6.8.8 Blob Magick[5408]: blob.c/OpenBlob/2538/Blob
read 3 magic header bytes

2014-06-27T11:19:29-05:00 0:00.056 0.063u 6.8.8 Cache Magick[5408]: cache.c/DestroyPixelCache/961/Cache
destroy

2014-06-27T11:19:29-05:00 0:00.057 0.063u 6.8.8 Configure Magick[5408]: configure.c/GetConfigureOptions/678/Configure
Searching for configure file: "magic.xml"

2014-06-27T11:19:29-05:00 0:00.058 0.063u 6.8.8 Configure Magick[5408]: configure.c/GetConfigureOptions/678/Configure
Searching for configure file: "C:\Users\jeffn.config\ImageMagick\magic.xml"

2014-06-27T11:19:29-05:00 0:00.060 0.063u 6.8.8 Configure Magick[5408]: configure.c/GetConfigureOptions/678/Configure
Searching for configure file: "C:\Users\jeffn.magick\magic.xml"

2014-06-27T11:19:29-05:00 0:00.061 0.063u 6.8.8 Configure Magick[5408]: magic.c/LoadMagicCache/774/Configure
Loading magic configure file "magic.xml" ...

2014-06-27T11:19:29-05:00 0:00.062 0.063u 6.8.8 Policy Magick[5408]: policy.c/IsRightsAuthorized/574/Policy
Domain: Coder; rights=Read; pattern="PCL" ...

2014-06-27T11:19:29-05:00 0:00.064 0.063u 6.8.8 Policy Magick[5408]: policy.c/IsRightsAuthorized/574/Policy
Domain: Path; rights=Read; pattern="C:\Projects\PCLTest.pcl" ...

2014-06-27T11:19:29-05:00 0:00.066 0.063u 6.8.8 Blob Magick[5408]: blob.c/OpenBlob/2538/Blob
read 3 magic header bytes

2014-06-27T11:19:29-05:00 0:00.067 0.063u 6.8.8 Cache Magick[5408]: cache.c/DestroyPixelCache/961/Cache
destroy

Viewing all articles
Browse latest Browse all 3693

Trending Articles