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

New Post: Web Application Difficulties


New Post: Web Application Difficulties

$
0
0
My application targets AnyCPU, but I changed it to target x64 (which makes sense) and it still does not work.

I purged that directory and ran into the same problem.

I'll try out process monitor to see if I can debug this issue further.

New Post: Web Application Difficulties

$
0
0
Resolved!

I managed to resolve the issue. I put ildasm onto AssetTracker.dll and noticed 32BITREQUIRED in the manifest. I am using Visual Studio 2012 Web Express and I thought I was targeting x64, but apparently this was not the case.

I looked into the csproj file and noticed AnyCPU all over the place, despite my x64 settings. I modified the csproj file to target AMD64 and everything seems to be working well.

Thanks for your help, your AnyCPU comment drove me down the path to resolving this issue.

New Post: How to combine multiple images into one

$
0
0
I want to create an image, which will be a mixture of multiple images places in different angles and positions, and overlapped partially.

I wonder, would it be possible to do with MagickImage? I tried a lot but can't figure it out.

New Post: How to combine multiple images into one

$
0
0
You should use the MagickImageCollection class. Here is an example:
using (MagickImageCollection images = new MagickImageCollection())
{
  MagickImage first = new MagickImage("first.png");
  images.Add(first);
  MagickImage second = new MagickImage("second.png");
  second.Page = new MagickGeometry(50, 50, 0, 0);
  images.Add(second);
  
  MagickImage result = images.Merge(LayerMethod.Mosaic);
  result.Write("output.png");
}

New Post: How to combine multiple images into one

$
0
0
Thanks dlemstra, you saved my day.

New Post: Converting .txt file to jpg Image

$
0
0
How can I convert a text file to Jpg???

New Post: Converting .txt file to jpg Image


New Post: Open raw images

$
0
0
I'm trying to open a CR2 raw image from a Canon camera but I get the exception UnableToOpenBlob `C:/.../AppData/Local/Temp/magick-1096qq7lCu64cJT6.ppm': No such file or directory @ error/blob.c/OpenBlob/2644

Can someone give me some help?

New Post: Open raw images

$
0
0
Can you provide me with a link to one of your images? That makes it easier for me to determine the problem. And which version of Magick.NET are you using?

New Post: Open raw images

$
0
0
Here is a link to the image http://audaxperginebasket.it/media/images/image.CR2

I tried with the dcraw.exe in the dll's directory but the result is the same: exception UnableToOpenBlob when I try to read the image
MagickImage image = new MagickImage(path_to_the_image);
or
MagickImage image = new MagickImage();
image.Read(path);

New Post: Open raw images

$
0
0
I am unable to download your file, it stops at 2.6mb. I used another CR2 image I found online and I got it to work. Did you place the dcraw.exe in the directory that contains delegates.xml and CORE_RL_Magick++.dll_? What is the result of:
using (MagickImage image = new MagickImage())
{
  image.Verbose = true;
  image.Read(path);
}

New Post: Open raw images

$
0
0
I placed the dcraw.exe in the directory as you suggested but it doesn't work. I tried with these images https://code.google.com/p/rawtohdri/downloads/detail?name=Canon_CR2_2.zip&can=2&q= as well and I get the UnableToOpenBlob error anyway.

I tried doing dcraw.exe image.CR2 from the command line and it generates image.ppm in the same directory. But if you look at the exception it says 'C:/.../AppData/Local/Temp/magick-1096qq7lCu64cJT6.ppm': No such file or directory.

Oh, ok, I figured out! I had ImageMagick installed and dcraw was in the system path. So when trying to read an image, the dcraw used was the one from IM and not the one in my bin folder.

Thanks for you help

New Post: Open raw images

$
0
0
I will put this information somewhere in the documentation so other people won't run into the same problem.

New Post: How to implement "best-fit" supplied text in a given region in image

$
0
0
Say, I want a 100 x 100 pixel image generated, and the argument is string of dynamic length. Now, the result image should have the supplied text in best-fit size in 100 x 100 area. It should be something like 'shrink to fit' option in MS Excel.

To complicate the matter, the string have formatting also, like font-family, oblique, and other text effects.

I'm struggling for it for 2 days now.

New Post: How to implement "best-fit" supplied text in a given region in image

$
0
0
You could use the FontTypeMetrics method of MagickImage to calculate the size of text you are drawing. Below is a simple example for when you are trying to write a single word:
string word = "Word!";

using (MagickImage image = new MagickImage(Color.Yellow, 100, 100))
{
  image.FillColor = Color.Purple;
  image.Font = "Garamond";
  image.Density = new MagickGeometry(72, 72);
  
  image.FontPointsize = 1;
  TypeMetric typeMetric = image.FontTypeMetrics(word);
  while (typeMetric.TextWidth < image.Width)
  {
    image.FontPointsize++;
    typeMetric = image.FontTypeMetrics(word);
  }
  image.FontPointsize--;
  
  image.Annotate(word, Gravity.Center);
  image.Write("output.png");
}

New Post: Exif data

$
0
0
At this moment you need to parse the exif data yourself. I created an issue to add a class that can be used to retrieve the exif data. I will try to include it in the next release.

New Post: Exif data

New Post: Convert gray PNG to black and white TIF produces garbage output.

$
0
0
I am new to ImageMagick (been using FreeImage) and I am trying to convert a bunch of grayscale PNG files to black and white (bi-tonal) tiffs. The code I have runs but produces tiffs that I can not open in anything, they are just garbage. Any help would be greatly appreciated. Here is what I got, it is C#:
public void convertPNGtoTiff(string workingFileName)
{
MagickImage PNGimage = new MagickImage(workingFileName);
PNGimage.QuantizeColorSpace = ColorSpace.GRAY;
PNGimage.QuantizeColors = 2;
PNGimage.QuantizeDither = true;
PNGimage.Quantize();
string newfilename = workingFileName.Substring(0, workingFileName.Length - 4) + ".tif";
PNGimage.Write(newfilename);
}

New Post: Convert gray PNG to black and white TIF produces garbage output.

$
0
0
I think you should use the extension 'tiff' instead of 'tif'.
Viewing all 3693 articles
Browse latest View live


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