December 12, 2013, 1:20 pm
Thx a lot! I'm your fan!
-Carsten
↧
December 12, 2013, 1:23 pm
↧
↧
December 12, 2013, 1:25 pm
You are welcome! :-) and thx a lot for your great work
Von meinem iPhone gesendet
Am 12.12.2013 um 22:23 schrieb "dlemstra" <[email removed]>:
↧
December 13, 2013, 12:30 am
Is there a way to determine the MagickReadSettings (before I read the image) I have to use?
↧
December 13, 2013, 12:55 am
You only need it in specific situations. For example when you try to read your AWR image.
↧
↧
December 13, 2013, 12:57 am
Ok, thank you. I hope, every ARW or CR2 has this behavior...
Thx a lot!
↧
December 13, 2013, 1:28 am
With the statement 'settings.Format = MagickFormat.Crw' you are forcing ImageMagick to use the internal crw decoder.
↧
December 16, 2013, 2:21 am
Hi
What would be the easiest way of combining two images if you want to set the transparancy of the upper one to say 50%. I'm working in C#. I've been looking into using composite and changing the alpha channel but I haven't been able to get it to work. Any suggestions? Or links to examples?
Thanks
↧
December 16, 2013, 4:04 am
I think you are looking for the QuantumOperator method. The following example should make your image 50% transparent.
using (MagickImage image = new MagickImage("input.png"))
{
image.Alpha(AlphaOption.Set); // If your image does not contain an alpha channel.
image.QuantumOperator(Channels.Alpha, EvaluateOperator.Set, Quantum.Max / 2);
image.Write("output.png");
}
After that you should be able to combine both your images using the correct CompositeOperator. You probably have to experiment a bit to find the right one.
↧
↧
December 16, 2013, 6:25 am
Thank you! It works great now.
I'm currently overlaying the images by simply merging them, but mainly out of curiosity, if I wanted to use a CompositeOperator, what's the correct syntax for the input args? I'm writing it like this:
public bool combineImagesInCollection(double transparency)
{
_images[0].Composite(_images[1], Gravity.Center, CompositeOperator.Blend, transparency.ToString());
_outImage = _images[0];
return true;
}
Thanks again!
↧
December 16, 2013, 7:39 am
↧
December 17, 2013, 2:13 am
Is there an API to do an Image comparison. Something similar to the command prompt option as given below
compare bag_frame1.gif bag_frame2.gif compare.gif
↧
December 17, 2013, 4:01 am
You can do this with the compare method:
using (MagickImage bagFrame1 = new MagickImage("bag_frame1.gif"))
{
MagickImage compare = new MagickImage();
MagickImage bagFrame2 = new MagickImage("bag_frame2.gif");
bagFrame1.Compare(bagFrame2, Metric.Undefined, compare);
compare.Write("compare.gif");
}
I am not sure if Metric.Undefined works, you might have to experiment a bit with the different Metric values.
↧
↧
December 17, 2013, 5:02 pm
I'm trying to get 200 page TIFs of quite high quality converted into single page PNGs of a lower quality.
The problem I'm having is that my C# app is using shed loads of disk space but hardly any memory. When I have it working on 2 files at once it takes up 12gb of disk space and only 50,000k of memory.
How do I set it to use more memory and less diskspace?
Thanks for any advice you can give me.
↧
December 17, 2013, 10:00 pm
With MagickNET.SetCacheThreshold you should be able to change the memory limit. You could also try reading your image page by page with the FrameIndex property of MagickReadSettings or input.tif[index].
↧
December 17, 2013, 11:53 pm
Thank you! I had issues with jpg files but png works great. I shall experiment with different Metric values as you have suggested. Thanks again :)
↧
December 20, 2013, 3:54 am
Hi,
I'm trying to draw text onto a transparent image and then crop the image to the text's bounding box. I have the following code (please see below) but (a) I'm specifying the image size which I'd like to avoid as I wont know the text size in advance and (b) I'm not cropping the image although the area I'm interested in is represented by the (bounding) box. Any help would be greatly appreciated.
Using image As New MagickImage(System.Drawing.Color.Transparent, 500, 150)
image.Format = MagickFormat.Png
Dim font As New DrawableFont("Arial")
Dim pointSize As New DrawablePointSize(50)
Dim fillColor As New DrawableFillColor(System.Drawing.Color.Black)
Dim strokeColor As New DrawableStrokeColor(System.Drawing.Color.Red)
Dim strokeWidth As New DrawableStrokeWidth(1)
Dim strokeAntialias As New DrawableStrokeAntialias(True)
Dim textAntialias As New DrawableTextAntialias(True)
Dim text As New DrawableText(10, 100, "Hello World")
Dim params() As ImageMagick.Drawable = {font, pointSize, strokeColor, fillColor, strokeWidth, strokeAntialias, textAntialias, text}
image.Draw(params)
Dim box As ImageMagick.MagickGeometry = image.BoundingBox
image.Write("helloworld.png")
End Using
Thanks
↧
↧
December 20, 2013, 3:56 am
Hello,
Could anyone please help me to achieve below conversion using magic.net
convert -density 288 image.emf -flatten -quality 00 -colorspace RGB -resize 50% -colorspace sRGB image.png
I am a newbie to imagemagick and magick.net, not familiar with magic.net API, I am finding it difficult to do the above conversion.
Thanks!
↧
December 20, 2013, 4:45 am
↧
December 20, 2013, 10:44 am
Hi,
Thanks. Using the FontTypeMetric I can create an image in proportion to the text I need to draw. I'm still not sure how to crop the image correctly though. If I don't crop my image and just write it to file as outlined in my original post then the image is ok but will have a larger border then I need around it. If I call the Trim method immediately before the Write method then things appear ok but if I open the file in an image editor (e.g. GIMP) the font appears offset from the transparent background (i.e. it's only partially visible). I'm not sure if its the same thing but in the docs there's talk of using "+repage" immediately after "-crop". How do you do the same thing using Magick.NET?
Thanks
↧