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

New Post: Magick.Net Convert 10bit log dpx file to jpg

$
0
0
Can you share the image you are using? And a bit of sample code?

New Post: Resize filter parameters

$
0
0
Hi Magick.Net
Filter Function group to use it for image resize was not found.
I hope for the addition of the functions. thanks.

example,
http://www.dylanbeattie.net/magick/filters/result.html

MagickSetImageArtifact(wand, "filter:lobes", 4)
MagickSetImageArtifact(wand, "filter:window", FilterTypes.Sinc);
MagickResizeImage(wand, 1280, 800, FilterTypes FilterTypes.LanczosFilter, (double) 1.1);

convert in.png -resize "1280x800" -filter Lanczos -blur 1.1 -define filter:window=Sinc -define filter:lobes=4 out.png

New Post: Resize filter parameters

New Post: Resize filter parameters

New Post: Using MagickImage.AddProfile() with ColorProfiles and problems with RemoveProfile()

$
0
0
I'm struggling to use MagickNet to colour-correct images. My wide-gamut monitor requires that images be colour-adjusted if they are not to display extremely exaggerated red hues.

So, I have been experimenting with using MagickImage.AddProfile() to apply a new ColorProfile to images, that I create by loading my monitor's colour profile from disk. At first this seemed to be working, but then I realised that it was only having an effect for images that already have the sRGB profile applied (or, it would seem, any other profile). Non-colour managed images are not affected by adding the monitor profile.

I just can't understand why it would be necessary for an image to have a colour profile already applied to be affected by applying a new, different one.

Additionally, RemoveProfile() appears to have no effect. In the following code, the call to RemoveProfile does nothing.
image.AddProfile(new ColorProfile(@"C:\...\LP2475w_20090407.icc"));
image.RemoveProfile(image.GetColorProfile().Name);

New Post: Magick.Net Convert 10bit log dpx file to jpg

$
0
0
dlemstra wrote:
Can you share the image you are using? And a bit of sample code?

my code

//this using magick.net
 public static FileInfo DPXConvertJPG(String ImagePath)
        {
            //check the dpx file
            //if dpx file used the nconvert to jpg
            //else used the magick.net to convert 

            MagickImage magickImage = new MagickImage(ImagePath);
            //MagickImage magickImage = new MagickImage();
            //magickImage.AddProfile(ColorProfile.SRGB);


            //magickImage.ColorSpace = ColorSpace.sRGB;

            //magickImage.Gamma(1.7);
            //magickImage.Format = MagickFormat.Jpeg;

            FileInfo Jpg = new FileInfo("temp.jpg");

            magickImage.Write(Jpg.FullName);
            return Jpg;
        }

//this function using the xnviewer`s nconvert.exe ,the result is true 
        public static FileInfo ImageConvertJpg(String ImagePath, String JpgPath)
        {
            //check the dpx file
            FileInfo image = new FileInfo(ImagePath);
            if (image.Exists)
            {
                //Get the extension to image
                Console.WriteLine(image.Extension);
                if (image.Extension == ".dpx")
                {
                    Execute execute = new Execute();
                    String command = @"nconvert.exe -o " + JpgPath + " -out jpeg ";
                    command = command + @"""" + ImagePath + @"""";

                    Console.WriteLine("Command : " + command);
                    String Output = execute.run(command);
                    Console.WriteLine(Output);

                    FileInfo Jpg = new FileInfo(JpgPath);
                    return Jpg;
                }
                else
                {
                    //other image file
                    MagickImage magickImage = new MagickImage(ImagePath);
                    FileInfo Jpg = new FileInfo(JpgPath);
                    magickImage.Write(Jpg.FullName);
                    return Jpg;
                }
            }
            else
            {
                return null;
            }
            return null;
        }
THX magick.net

Dpx file can`t send email to magick@discussions.codeplex.com

New Post: Applied ColorProfiles not having an effect on MagickImages

$
0
0
I am not an expert with color profiles but maybe you can get the same result if you first add the sRGB color profile (ColorProfile.SRGB) and then add your own. I have also tested the code you posted and in my unit test it removes the profile. The next call to image.GetColorProfile() will return null.

New Post: Applied ColorProfiles not having an effect on MagickImages

$
0
0
I had actually already tried manually setting an sRGB profile just as you suggested, but it made no difference. It seems to need to be embedded in the image file to begin with. To be clear, this is what I am currently running:
image = new MagickImage();
image.Read(@"E:\test.jpg");
image.AddProfile(ColorProfile.SRGB);      
image.AddProfile(new ColorProfile(@"C:\...\LP2475w_20090407.icc"));
which does not apply the colour profile
image = new MagickImage();
image.Read(@"E:\test sRGB.jpg");     
image.AddProfile(new ColorProfile(@"C:\...\LP2475w_20090407.icc"));
... whereas this does (test sRGB.jpg is exactly the same image file, but set in Photoshop to use the default system sRGB profile instead of not being colour managed; the image data is identical).

As for RemoveProfile(), I have played around a bit more. It seems to work only on profiles that were added programmatically. In other words, it will remove a colour profile that was previously added with AddProfile(), but it will not remove a profile that is associated with the image in the file on disk that the image was read from.

New Post: Magick.Net Convert 10bit log dpx file to jpg

$
0
0
I find out that command :
convert.exe -colorspace log test.dpx -set colorspace sRGB test.jpg

New Post: Magick.Net Convert 10bit log dpx file to jpg

$
0
0
I am getting the correct result with the following code:
using (MagickImage image = new MagickImage("161-020-03_A091.0003894.dpx"))
{
  image.SetAttribute("colorspace", "sRGB");
  image.Write("output.jpg");
}

New Post: How to define floating point format

$
0
0
In the image format listing on the ImageMagick website, the format GRAY says to use single precision floating point format use -define quantum:format=floating-point

And in the Magick++ library Image contains a constructor where you can specify StorageType

How is this done with Magick.net? Or do I have to cast them to UInt16 and then to a byte[]

New Post: Magick.Net Convert 10bit log dpx file to jpg

$
0
0
dlemstra wrote:
I am getting the correct result with the following code:
using (MagickImage image = new MagickImage("161-020-03_A091.0003894.dpx"))
{
  image.SetAttribute("colorspace", "sRGB");
  image.Write("output.jpg");
}
in Nagick.NET-6.8.6301-Q16-x86-net20 the code is
            MagickImage magickImage = new MagickImage(DpxPath);
            magickImage.Attribute("colorspace", "sRGB");
            magickImage.Write("output.jpg");

New Post: How to define floating point format

$
0
0
Or do I have to cast them to UInt16 and then to a byte[]
Can you specify them? Where are you trying to load your image from?

New Post: Converting mask to color

$
0
0
Hi,

I am unsuccessfully trying to give color to a mask. From the ImageMagick documentation I found there are a few ways to do this. How can I achieve any of the following with Magick.NET?
 convert heart_mask.gif  -background Red -alpha Shape  heart_red.png
or
 convert heart_mask.gif -negate  \
      -background Gold  -channel A  -combine   heart_gold.png
or
 convert heart_mask.gif \( +clone \) -alpha off \
      -compose CopyOpacity  -composite \
      -fill HotPink  -colorize 100%    heart_hotpink.png
Thank you for your time.

New Post: Converting mask to color

$
0
0
Can you share your heart_mask.gif image?

New Post: Converting mask to color

$
0
0
Yes. I'm basically trying to generate some of the jQuery UI icon images. The mask has a typical black background with the icons colored white, and I want to color the white icons blue let's say on a transparent background. Could you please give me a code snippet as well through which I can achieve this? I think I tried using ColorAlpha but it did not appear to work. Regardless, I'll try again.

Thank you for your prompt response.

New Post: Converting mask to color

New Post: Converting mask to color

New Post: Converting mask to color

$
0
0
I will add both Alpha and LevelColors. After the next release that I will publish this weekend you will be able to do this:
// Background purple, foreground yellow.using (MagickImage image = new MagickImage("mask.png"))
{
  image.LevelColors(Color.Purple, Color.Yellow);
  image.Write("mask-ithurtsmyeyes.png");
}

// Background transparent, foreground blue.using (MagickImage image = new MagickImage("mask.png"))
{
  image.BackgroundColor = Color.Blue;
  image.Alpha(AlphaOption.Shape);
  image.Write("mask-blue.png");
}

New Post: Converting mask to color

$
0
0
That sounds great. Thank you very much.
Viewing all 3693 articles
Browse latest View live


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