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

New Post: ImageMagick reads/converts TrueColor TIF as Grayscale?

$
0
0
I agree with you that it might be better to add it as an option but that is not such an easy action to do. And it would also require the users that now expect this behavior to change their commands on the command line. The Magick++ (C++ code of Imagemagick) code was a bug because asking the ColorType changed the ColorType. This change in ColorType should only by done by the coder that writes the tiff image. Each format has their own coder and own code to decide what to do with the ColorType. The person who wrote the tiff coder decided that it would be best to make the image as small as possible and use Gray when possible. If we added an option for this we would have to change this in all our 120+ coders :).

I also do not understand the color spaces completely. It seems there are a lot more RGB color spaces then 3 you listed (http://en.wikipedia.org/wiki/RGB_color_space#Specifications). I have no idea which one ImageMagick uses for ColorSpace.RGB. We did make a switch a while back to fix the sRGB colorspace: http://www.imagemagick.org/script/color-management.php.

New Post: No such file or directory...

$
0
0
Your AI file seems to be corrupt. I am getting an error from Ghostscript on the command line. I am working on fixing the error message in Magick.NET/ImageMagick. It is now showing an incorrect error message. You could file a bug report here: http://bugs.ghostscript.com/

New Post: ImageMagick reads/converts TrueColor TIF as Grayscale?

$
0
0
".. we would have to change this in all our 120+ coders"
I agree with that, it would be a nightmare.
“And it would also require the users that now expect this behavior to change their commands on the command line.”
I agree with that too.

I have to read more about ColorSpaces because my knowledge is not good enough to make clear statements about this complicated topic.

New Post: Nuget Version ?

$
0
0
Hi,

when you recompiled libraries (with ImageMagick 6.8.9.0 for example), can you published it on nuget ?

When do you published new version on nuget ?

Regards,

Frédéric O.

New Post: Nuget Version ?

$
0
0
When I publish a new release I will always publish it directly on NuGet.

New Post: Run error on windows servier 2008 r2

$
0
0
Local environment everything is normal,
Deployed to a server error occurred

The Winfrom Project
Operating Environment Windows 2008 r2 x64
.Net4.0
************** Exception Text **************
System.TypeInitializationException: The type initializer for 'ImageMagick.Types' threw an exception. ---> System.TypeInitializationException: The type initializer for 'ImageMagick.AssemblyHelper' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Magick.NET-Q16-x64.dll' or one of its dependencies. 找不到指定的模块。
   at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
   at System.Reflection.Assembly.LoadFile(String path)
   at ImageMagick.AssemblyHelper..cctor()
   --- End of inner exception stack trace ---
   at ImageMagick.AssemblyHelper.GetType(String name)
   at ImageMagick.Types..cctor()
   --- End of inner exception stack trace ---
   at ImageMagick.MagickImage..ctor(Stream stream)
   at Cloud7.Demo.ImageResizer.ImageMagickTool.Resize(ImageResizeArgs args, Stream stream) in e:\Job\Cloud7\Cloud7.Demo.ImageResizer\Cloud7.Demo.ImageResizer\ImageMagickTool.cs:line 17
   at Cloud7.Demo.ImageResizer.Form1.MediaImageModel.Convert(Stream stream, ImageSizeType imageSizeType) in e:\Job\Cloud7\Cloud7.Demo.ImageResizer\Cloud7.Demo.ImageResizer\Form1.cs:line 360
   at Cloud7.Demo.ImageResizer.Form1.Convert(ImageSizeType imageSizeType) in e:\Job\Cloud7\Cloud7.Demo.ImageResizer\Cloud7.Demo.ImageResizer\Form1.cs:line 98
   at Cloud7.Demo.ImageResizer.Form1.btn_Small_Click_1(Object sender, EventArgs e) in e:\Job\Cloud7\Cloud7.Demo.ImageResizer\Cloud7.Demo.ImageResizer\Form1.cs:line 38
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

New Post: Run error on windows servier 2008 r2

New Post: append images to output pdf file

$
0
0
Hi, all!

first sorry my English.

Magick.NET is great!
but I have a little issue.
this is not an issue with Magick.NET, but i can't ask it in usual programers forum, because it directly relates to Magick.NET and I hope to get help here.
here is a problem:
there is 300 jpg files. size is about 500 Kb each. I need to create one pdf from these 300 jpg. I used an example from documentation - Create a PDF from two images - and it works fine! but if there 300 images, program starts to eat 1,5 Gb of memory. this is not acceptable for me. I find another way to do this and here is my code:
            using (MagickImageCollection collection = new MagickImageCollection())
            {
                string[] jpgs = Directory.GetFiles(@"c:\PDF\", @"*.jpg");
               
                using (FileStream fs = new FileStream(@"c:\PDF\out.pdf", FileMode.Append))
                {
                    foreach (string jpg in jpgs)
                    {
                        MagickImage img = new MagickImage(jpg);
                        img.Format = MagickFormat.Pdf;
                        collection.Add(img);
                        collection.Write(fs);
                        fs.Flush();
                        collection.Clear();//if don't do this, memory will grow very fast
                    }
                }
            }
Output pdf file have a size by which it can be argued that there is all of images! but if I open it - there is only one page! the last added page! all I need - to see all of the added pages.

what am I doing wrong?

thank you very much!

New Post: Prevent OutOfMemory and other errors allowing only one to load at a time

$
0
0
I am trying to make an image player which should play in real time. Some images can not be loaded in 1/30 of second so I would like to skip them and load the last one in queue. Is there a way to do that

Image

If the image makes sense

New Post: Prevent OutOfMemory and other errors allowing only one to load at a time

$
0
0
I wonder if Magick.NET is the right tool to use in a real time image player. I also don't know a good solution for the problem you are having.

You should probably make an educated guess before you read the image. Depending on the format you are reading you can maybe use MagickImageInfo to get basic image information and make a guess if you want to read or skip the image. This class should read the basic information of your image quickly. If the format you are using does not read quickly with this class you could do something with the file size. You should also do some kind of buffering to give yourself a couple of frames to make decisions.

If your image format cannot be read quickly with the MagickImageInfo class please let me know so I can see if the reading speed can be improved.

p.s. Can you check this issue again: https://magick.codeplex.com/workitem/1188. I have contacted you a couple of times through Codeplex. Maybe those e-mails are ending up in your spam box?

New Post: append images to output pdf file

$
0
0
If you want to create a PDF with 300 images you will first have to read all of them in memory. You could use the Q8 instead of the Q16 version of Magick.NET to reduce the memory that is being used.

You cannot write a multipage PDF file by appending to the file. You will have to write the whole file at once:
using (MagickImageCollection collection = new MagickImageCollection())
{
  string[] jpgs = Directory.GetFiles(@"c:\PDF\", @"*.jpg");

  foreach (string jpg in jpgs)
  {               
    MagickImage img = new MagickImage(jpg);
    img.Format = MagickFormat.Pdf;
    collection.Add(img);
  }
  collection.Write(@"c:\PDF\out.pdf");
}

New Post: append images to output pdf file

$
0
0
Thank you for reply!


dlemstra wrote:
If you want to create a PDF with 300 images you will first have to read all of them in memory. You could use the Q8 instead of the Q16 version of Magick.NET to reduce the memory that is being used.

You cannot write a multipage PDF file by appending to the file. You will have to write the whole file at once:
i have little questions about it:
you said i have to write the whole file at once. is it the only way to do it? i mean is the inability to write a multipage PDF file by appending to the file due to pdf specification or to implementation of magick.net?

thx

New Post: append images to output pdf file

$
0
0
This is the only way to do it with Magick.NET (ImageMagick). The pdf specifications don't allow appending to the file. Maybe you should find another tool to combine multiple images into one pdf that does not load all the bitmap data.

New Post: append images to output pdf file

$
0
0
Thank you for reply!
I can't find such tool. so I will find another way to do required work.
thanks!

New Post: Prevent OutOfMemory and other errors allowing only one to load at a time

$
0
0
Thank you. I think buffering is the way to go then.

I never get any emails from codeplex. I checked the problem and I am replying you in that thread.

New Post: ColorProfiles not matching

$
0
0
Using the latest release, shouldn't the ColorProfiles match:
        MagickImage miSource = new MagickImage(filePath);
        ColorProfile cp1 = miSource.GetColorProfile();
        ColorProfile cp2 = miSource.GetColorProfile();

        if (cp1 != cp2)
        {
            throw new Exception("not correct color profile");
        }
The following works(no exception thrown):
         if (cp1.ToByteArray().Length != cp2.ToByteArray().Length)
         {
            throw new Exception("not correct color profile");
         }
Let me know if you need my source image.

New Post: ColorProfiles not matching

$
0
0
You are getting a new Object every time so they will not be the same. I will have to make the ImageProfile class IComparable.

New Post: ColorProfiles not matching

$
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: Convert with HoughLines

$
0
0
Seems pretty intuitive. I just have to learn IM a bit better. Thanks for your help. No, I wouldn't have figured out clone.SetArtifact(). Now I know.

New Post: Convert with HoughLines

$
0
0
You should not need the clone.SetArtificat(). I have fixed this in the source code of ImageMagick and in the next release of Magick.NET you can use the code from the comments.
Viewing all 3693 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>