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

New Post: Load image in Image control

$
0
0
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.

New Post: Magick: Postscript delegate failed...No such file or directory

New Post: Magick: Postscript delegate failed...No such file or directory

New Post: Magick: Postscript delegate failed...No such file or directory

$
0
0
Can you upgrade to 9.10 and try again?

New Post: Magick: Postscript delegate failed...No such file or directory

New Post: Converting(any?) image to black and white

$
0
0
First off, very cool library, thank you for creating it. Also, my questions are probably more related to my lack of image understanding than the library but anyway.

I have a JPG file(which I hope uploading to photobucket did not change.
[Image]
http://i1333.photobucket.com/albums/w623/rangothonlinerangoth/photo_zps3b2313f9.jpg
[/Image]

and I am trying to convert it to a pure B&W 1 bit image, using either dithering, thresholding, etc.

When I convert it to a TIFF and use GROUP 4 compression I do seem to be able to get the image to turn B&W and I've been able to successfully convert it to TIFF, open and view it in other application etc.

But I cannot seem to save it as a JPG(original format) that is 1bit B&W.

I've tried all sorts of crazy combinations of the following mutators/function calls:
.BlackThreshold()
.BitDepth(Channels.All, 1)
.Depth = 1

I've also tried a .Strip() before those calls based on some other responses I saw about certain profiles overriding things(not sure if I fully understand that part).

The only thing that seems to work is this:
                    this.imageData[page].QuantizeColorSpace = ColorSpace.GRAY;
                    this.imageData[page].QuantizeDither = true;
                    this.imageData[page].Quantize();
But it turns it gray, not B&W

I hope this doesn't come across at nit-picky, just curious on how to achieve what I am looking for if it is even possible.

Side question: is there any documentation on what the actual function calls do? Like an MSDN/API doc?

-Mark

New Post: Converting(any?) image to black and white

$
0
0
The .Strip command does not influence the value of a pixel. It removes metadata from an image file (http://www.imagemagick.org/script/command-line-options.php#strip).

You should be able to do the following (this is the equivalent of convert.exe photo_zps3b2313f9.jpg -threshold 25% blackwhite.jpg):
using (MagickImage image = new MagickImage(@"photo_zps3b2313f9.jpg"))
{
  image.Threshold(0.25);
  image.Write("blackwhite.jpg");
}
But this does not seem to work and creates a completely white image. I will have to investigate this for you to figure out what is happening.

If you are looking for documentation about what actual function calls do I would advise you to visit: http://www.imagemagick.org/Usage/ or check the command line options on this page: http://www.imagemagick.org/script/command-line-options.php. The names of the command line options are almost the same as the methods in the MagickImage class.

New Post: Converting(any?) image to black and white

$
0
0
Thank you very much for the response. I appreciate the link as well. I somehow missed that in all of my searching.

-Mark

New Post: Magick net parameters

$
0
0
Hello.

Quite new using Magick.net.

I've been deploying a service on a Windows Server 2003 with 4GB RAM and a limited free space in C: unit.

So far, I have overcome the lack of resources creating several environment variables (MAGICK_MEMORY_LIMIT, MAGICK_TEMPORARY_PATH and MAGICK_TMPDIR).

What I am wondering now is if instead of creating the environment variables, the configuration of those parameters can be done through the Initialize method and how. Because, I haven't found a good documentation on this issue.

Any help will be welcome.

Thanks in advance.

New Post: Magick Script & Composite

$
0
0
Hi,

Thank you very much for your perfect work.
How can i used Composite in Magick Script ?

Like this :
                MagickImage futmask2 = new MagickImage(System.Drawing.Color.Black, 850, 340);
                
                string func3 = "xcercle=(i-(850)/2)/((850+50)) ; ycercle = sqrt(1-xcercle^2);  ymax=abs(xcercle)>1?0:ycercle  ;ymax";
                futmask2.Fx(func3);
                futmask2.Write("out\\futmask2.png");

                MagickImage test = new MagickImage(filein);
                test.VirtualPixelMethod = VirtualPixelMethod.Transparent;
                test.BackgroundColor = MagickColor.Transparent;
                
                test.Composite(futmask2, 0, 0, CompositeOperator.Darken);
                test.Write("out\\base2.png");

New Post: Magick net parameters

$
0
0
You can set MAGICK_TEMPORARY_PATH/MAGICK_TMPDIR using MagickNET.SetTempDirectory. If you want to limit the resources that are being used you should use the properties in the recently created static class ResourceLimits.

New Post: Magick net parameters

$
0
0
Thankas a lot, dlemstra!!

I am testing now, but I think you will have a beer bonus.

New Post: Magick net parameters

New Post: Magick Script & Composite

$
0
0
You can read the mask directly in the script when you specify the file name (the commented part) or you can use the 'Read' event to load the image. Below is an example that uses the Read event.

script.msl
<msl><read><virtualPixelMethodvalue=""Transparent""/><backgroundColorvalue=""Transparent""/><compositex=""0""y=""0""compose=""Darken""><!--<image fileName=""out\\futmask2.png""/>--><imageid=""mask""/></composite></read></msl>"
staticvoid ExecuteScript()
{
  MagickScript script = new MagickScript("script.msl");
  script.Read += script_Read;

  using (MagickImage test = new MagickImage(filein))
  {
    script.Execute(test);
    test.Write("out\\base2.png");
  }
}
staticvoid script_Read(object sender, ScriptReadEventArgs arguments)
{
  if (arguments.Id == "mask")
  {
    MagickImage futmask2 = new MagickImage(System.Drawing.Color.Black, 850, 340);

    string func3 = "xcercle=(i-(850)/2)/((850+50)) ; ycercle = sqrt(1-xcercle^2);  ymax=abs(xcercle)>1?0:ycercle  ;ymax";
    futmask2.Fx(func3);
    arguments.Image = futmask2;
  }
}

New Post: Postscript delegate failed - No such file or directory @ error/pdf.c/ReadPDFImage/682

$
0
0
Hi everyone.

I've got the following error when trying to open .ai images:

ERROR 2014-03-07 10:53:14,812 [6] Logic.clsMaqueta - ImageMagick.MagickDelegateErrorException: Magick: Postscript delegate failed `\sesdesboa01\datos$\Tratamiento Imagenes NETEX\Proceso\Original completo NO JPG\Links\630928.ai': No such file or directory @ error/pdf.c/ReadPDFImage/682
at ImageMagick.MagickImageCollection.HandleReadException(MagickException exception)
at ImageMagick.MagickImageCollection.Read(String fileName, MagickReadSettings readSettings)
at ImageMagick.MagickImageCollection..ctor(String fileName)
at Logic.clsMagickImageUtils.ImagenCMYK2RGB(Boolean magickLogDebugInfo, String magickTemporaryDir, UInt64 magickMemoryLimit, FileInfo inputImage, String outputImageFullName, ColorProfile colorProfile, String customColorProfileName, String customColorProfileFile, String resolucion, String size, MagickFormat formatoSalida, Boolean hasClipMask, Boolean hasLayers)
at Logic.clsMaqueta.processImageSize(FileInfo imagen, String salidaFolder, String size, Boolean hasClipMask, Boolean hasLayers)


I'm using Magick.net in a Windows service that runs on a Windows Server 2003 32 Bits.

I have double checked that Ghostscript 32 Bits version is installed. I have even uninstalled, run CCleaner and reinstalled. Presently, and it should be the final configuration, it is not installed in C:, but in another unit. I have tried uninstalling and installing in C:, but without success.

The user logon of the service has enough privileges to run both, the service and ghostscript.

The same configuration of the service, in my local station works well. The main difference is that it is a 64 Bits Windows 7, but I'm using the same user in both machines.

If any of you can help, you'll be welcome.

Thanks.

New Post: Postscript delegate failed - No such file or directory @ error/pdf.c/ReadPDFImage/682

New Post: Postscript delegate failed - No such file or directory @ error/pdf.c/ReadPDFImage/682

$
0
0
Hi dlemstra,

Ghostscript is installed in the default folder, but changing the unti. That is

E:\Program Files\gs\gs9.10

Presently I do have debug enabled, and I get the following log.
I've bolded the errors.

I'm trying to find what "Ghostscript returns status -100, exit code 0" means.

The .ai images that I'm trying to convert do exist.

INFO 2014-03-07 13:08:16,138 [6] Logic.clsMagickImageUtils - Habilitado el log de informaci󮠤e Debug de Magick.Net
INFO 2014-03-07 13:08:16,138 [6] Logic.clsMagickImageUtils - Magick temporary dir : \sesdesboa01\f$\Temp\Magick
INFO 2014-03-07 13:08:16,138 [6] Logic.clsMagickImageUtils - Magick memory limit : 1073741824
DEBUG 2014-03-07 13:08:16,138 [6] Logic.clsMagickImageUtils - Magick.net debug info -->2014-03-07T13:08:16+01:00 0:00.015 0.016u 6.8.8 Policy Magick[5732]: policy.c/IsRightsAuthorized/485/Policy
Domain: Path; rights=Read; pattern="\sesdesboa01\datos$\Tratamiento Imagenes NETEX\Proceso\Original completo NO JPG\Links\630928.ai" ...
DEBUG 2014-03-07 13:08:16,138 [6] Logic.clsMagickImageUtils - Magick.net debug info -->2014-03-07T13:08:16+01:00 0:00.015 0.016u 6.8.8 Blob Magick[5732]: blob.c/OpenBlob/2536/Blob
read 3 magic header bytes
DEBUG 2014-03-07 13:08:16,138 [6] Logic.clsMagickImageUtils - Magick.net debug info -->2014-03-07T13:08:16+01:00 0:00.015 0.016u 6.8.8 Cache Magick[5732]: cache.c/DestroyPixelCache/961/Cache
destroy
DEBUG 2014-03-07 13:08:16,154 [6] Logic.clsMagickImageUtils - Magick.net debug info -->2014-03-07T13:08:16+01:00 0:00.031 0.031u 6.8.8 Policy Magick[5732]: policy.c/IsRightsAuthorized/485/Policy
Domain: Coder; rights=Read; pattern="PDF" ...
DEBUG 2014-03-07 13:08:16,154 [6] Logic.clsMagickImageUtils - Magick.net debug info -->2014-03-07T13:08:16+01:00 0:00.031 0.031u 6.8.8 Policy Magick[5732]: policy.c/IsRightsAuthorized/485/Policy
Domain: Path; rights=Read; pattern="\sesdesboa01\datos$\Tratamiento Imagenes NETEX\Proceso\Original completo NO JPG\Links\630928.ai" ...
DEBUG 2014-03-07 13:08:16,154 [6] Logic.clsMagickImageUtils - Magick.net debug info -->2014-03-07T13:08:16+01:00 0:00.031 0.031u 6.8.8 Blob Magick[5732]: blob.c/OpenBlob/2536/Blob
read 3 magic header bytes
DEBUG 2014-03-07 13:08:16,154 [6] Logic.clsMagickImageUtils - Magick.net debug info -->2014-03-07T13:08:16+01:00 0:00.031 0.031u 6.8.8 Cache Magick[5732]: cache.c/DestroyPixelCache/961/Cache
destroy
DEBUG 2014-03-07 13:08:16,154 [6] Logic.clsMagickImageUtils - Magick.net debug info -->2014-03-07T13:08:16+01:00 0:00.031 0.031u 6.8.8 Policy Magick[5732]: policy.c/IsRightsAuthorized/485/Policy
Domain: Path; rights=Read; pattern="\sesdesboa01\datos$\Tratamiento Imagenes NETEX\Proceso\Original completo NO JPG\Links\630928.ai" ...
DEBUG 2014-03-07 13:08:16,154 [6] Logic.clsMagickImageUtils - Magick.net debug info -->2014-03-07T13:08:16+01:00 0:00.031 0.031u 6.8.8 Blob Magick[5732]: blob.c/OpenBlob/2536/Blob
read 3 magic header bytes
DEBUG 2014-03-07 13:08:20,232 [6] Logic.clsMagickImageUtils - Magick.net debug info -->2014-03-07T13:08:20+01:00 0:04.109 3.813u 6.8.8 Exception Magick[5732]: pdf.c/InvokePDFDelegate/205/Exception
%s': %s "E:/Program Files/gs/gs9.10/bin/gswin32c.exe" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pamcmyk32" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -dUseCIEColor "-sOutputFile=//sesdesboa01/f$/Temp/Magick/magick-5732vI-u3Ctln_ZP76142608" "-f//sesdesboa01/f$/Temp/Magick/magick-5732yxO95GapwyHD" "-f//sesdesboa01/f$/Temp/Magick/magick-5732shcu3C1X4V6n"
__DEBUG 2014-03-07 13:08:20,232 [6] Logic.clsMagickImageUtils - Magick.net debug info -->2014-03-07T13:08:20+01:00 0:04.109 3.813u 6.8.8 Coder Magick[5732]: pdf.c/InvokePDFDelegate/208/Coder
Ghostscript returns status -100, exit code 0
____DEBUG 2014-03-07 13:08:20,232 [6] Logic.clsMagickImageUtils - Magick.net debug info -->2014-03-07T13:08:20+01:00 0:04.109 3.813u 6.8.8 Exception Magick[5732]: pdf.c/ReadPDFImage/682/Exception
Postscript delegate failed
\sesdesboa01\datos$\Tratamiento Imagenes NETEX\Proceso\Original completo NO JPG\Links\630928.ai': No such file or directory
__DEBUG 2014-03-07 13:08:20,232 [6] Logic.clsMagickImageUtils - Magick.net debug info -->2014-03-07T13:08:20+01:00 0:04.109 3.813u 6.8.8 Cache Magick[5732]: cache.c/DestroyPixelCache/961/Cache
destroy
DEBUG 2014-03-07 13:08:20,232 [6] Logic.clsMagickImageUtils - Magick.net debug info -->2014-03-07T13:08:20+01:00 0:04.109 3.813u 6.8.8 Cache Magick[5732]: cache.c/DestroyPixelCache/961/Cache
destroy
__ERROR 2014-03-07 13:08:20,232 [6] Logic.clsMagickImageUtils - ImageMagick.MagickDelegateErrorException: Magick: Postscript delegate failed \\sesdesboa01\datos$\Tratamiento Imagenes NETEX\Proceso\Original completo NO JPG\Links\630928.ai': No such file or directory @ error/pdf.c/ReadPDFImage/682
at ImageMagick.MagickImage.HandleReadException(MagickException exception)
at ImageMagick.MagickImage.Read(String fileName)
at Logic.clsMagickImageUtils.ImagenCMYK2RGB(Boolean magickLogDebugInfo, String magickTemporaryDir, UInt64 magickMemoryLimit, FileInfo inputImage, String outputImageFullName, ColorProfile colorProfile, String customColorProfileName, String customColorProfileFile, String resolucion, String size, MagickFormat formatoSalida, Boolean hasClipMask, Boolean hasLayers)
ERROR 2014-03-07 13:08:20,232 [6] Logic.clsMaqueta - ImageMagick.MagickDelegateErrorException: Magick: Postscript delegate failed
\sesdesboa01\datos$\Tratamiento Imagenes NETEX\Proceso\Original completo NO JPG\Links\630928.ai': No such file or directory @ error/pdf.c/ReadPDFImage/682
at ImageMagick.MagickImage.HandleReadException(MagickException exception)
at ImageMagick.MagickImage.Read(String fileName)
at Logic.clsMagickImageUtils.ImagenCMYK2RGB(Boolean magickLogDebugInfo, String magickTemporaryDir, UInt64 magickMemoryLimit, FileInfo inputImage, String outputImageFullName, ColorProfile colorProfile, String customColorProfileName, String customColorProfileFile, String resolucion, String size, MagickFormat formatoSalida, Boolean hasClipMask, Boolean hasLayers)
at Logic.clsMaqueta.processImageSize(FileInfo imagen, String salidaFolder, String size, Boolean hasClipMask, Boolean hasLayers)
__

New Post: Postscript delegate failed - No such file or directory @ error/pdf.c/ReadPDFImage/682

$
0
0
Should I define a postscript printer in the server?

New Post: Postscript delegate failed - No such file or directory @ error/pdf.c/ReadPDFImage/682

$
0
0
You don't need to do that. Can you add a link to your file or contact me through CodePlex if you don't want to publicly share your image.

New Post: Postscript delegate failed - No such file or directory @ error/pdf.c/ReadPDFImage/682

$
0
0
I'll do it if the testing I'm carrying on fails.
Viewing all 3693 articles
Browse latest View live