Quantcast
Channel: magick Issue Tracker Rss Feed
Viewing all 1011 articles
Browse latest View live

Commented Unassigned: VS Debug Disabling when SetTempDirectory was called [1409]

$
0
0
I am use latest Magick.NET-16-AnyCPU library only for loading images in different formats, init code is:
```
StartupPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

string TempDirectory = Path.Combine(StartupPath, "Temp");
if (!Directory.Exists(TempDirectory))
Directory.CreateDirectory(TempDirectory);

MagickAnyCPU.CacheDirectory = StartupPath;
MagickAnyCPU.HasSharedCacheDirectory = false;
MagickNET.SetTempDirectory(TempDirectory);

/* int[] A = new int[1]; //VS stop Debug there!!!
A[4] = 0; */
```
as result if program have some exception before "MagickNET.SetTempDirectory(TempDirectory);", debug stopped at line with it, else (after SetTempDirectory) - see attached ScreenShot.
Comments: What happens when you set MagickAnyCPU.CacheDirectory to a location outside the bin directory? Might be possible that .NET 2.0 is not happy with that location.

Commented Unassigned: VS Debug Disabling when SetTempDirectory was called [1409]

$
0
0
I am use latest Magick.NET-16-AnyCPU library only for loading images in different formats, init code is:
```
StartupPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

string TempDirectory = Path.Combine(StartupPath, "Temp");
if (!Directory.Exists(TempDirectory))
Directory.CreateDirectory(TempDirectory);

MagickAnyCPU.CacheDirectory = StartupPath;
MagickAnyCPU.HasSharedCacheDirectory = false;
MagickNET.SetTempDirectory(TempDirectory);

/* int[] A = new int[1]; //VS stop Debug there!!!
A[4] = 0; */
```
as result if program have some exception before "MagickNET.SetTempDirectory(TempDirectory);", debug stopped at line with it, else (after SetTempDirectory) - see attached ScreenShot.
Comments: I make new folder on Drive C, results the same (on screenshots): [SetTempDirectory](http://c2n.me/3BXOw6H) [CacheDirectory](http://c2n.me/3BXOInh) Adding "\" to end of path "C:\TMPFolder" don't work.

Created Unassigned: Cannot write proper progressive JPEG [1410]

$
0
0
Using Magick.NET-7.0.3.1-Q8-AnyCPU.zip I'm attempting to take an image and make it a progressive JPEG, however this isn't working as expected.

```
public static void ProcessJpegImageProgressive(Bitmap image, ref MemoryStream stream)
{
using (MagickImage mImage = new MagickImage(image))
{
mImage.Strip();
mImage.Format = MagickFormat.Pjpeg;
mImage.Interlace = Interlace.Plane;
mImage.Quality = 80;
mImage.Depth = 8;
mImage.Settings.SetDefine(MagickFormat.Jpeg, "sampling-factor", "4:2:0");

//mImage.Format = MagickFormat.Pjpeg;
//mImage.CompressionMethod = CompressionMethod.JPEG;
//mImage.SetOption(MagickFormat.Jpeg, "sampling-factor", "4x1,2x1,2x1");

mImage.Write(stream);
}
}
```

Commented Unassigned: VS Debug Disabling when SetTempDirectory was called [1409]

$
0
0
I am use latest Magick.NET-16-AnyCPU library only for loading images in different formats, init code is:
```
StartupPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

string TempDirectory = Path.Combine(StartupPath, "Temp");
if (!Directory.Exists(TempDirectory))
Directory.CreateDirectory(TempDirectory);

MagickAnyCPU.CacheDirectory = StartupPath;
MagickAnyCPU.HasSharedCacheDirectory = false;
MagickNET.SetTempDirectory(TempDirectory);

/* int[] A = new int[1]; //VS stop Debug there!!!
A[4] = 0; */
```
as result if program have some exception before "MagickNET.SetTempDirectory(TempDirectory);", debug stopped at line with it, else (after SetTempDirectory) - see attached ScreenShot.
Comments: As you can see you are getting an exception in your own code. The "CacheDirectory screenshot" works perfectly but your code is invalid: ``` int[] A = new int[1]; A[100] = 12345; ``` Your array 'A' only has room for one item and you are adding something at the index 100.

Commented Unassigned: VS Debug Disabling when SetTempDirectory was called [1409]

$
0
0
I am use latest Magick.NET-16-AnyCPU library only for loading images in different formats, init code is:
```
StartupPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

string TempDirectory = Path.Combine(StartupPath, "Temp");
if (!Directory.Exists(TempDirectory))
Directory.CreateDirectory(TempDirectory);

MagickAnyCPU.CacheDirectory = StartupPath;
MagickAnyCPU.HasSharedCacheDirectory = false;
MagickNET.SetTempDirectory(TempDirectory);

/* int[] A = new int[1]; //VS stop Debug there!!!
A[4] = 0; */
```
as result if program have some exception before "MagickNET.SetTempDirectory(TempDirectory);", debug stopped at line with it, else (after SetTempDirectory) - see attached ScreenShot.
Comments: Yes, code is invalid and was used for example only! And i MUST have OutOfRange Exception. But after using Magick.NET (.NET 2.0 only) ``` MagickNET.SetTempDirectory(Path.GetTempPath()); ``` I am don't see any exception, only error message. How I can debug my app if I don't see exceptions in Debug mode? Just watch [video](https://youtu.be/P5MltQXd5x8)! P.S. When I said "works perfectly" I am talk about Visual Studio Debug works perfectly.

Commented Unassigned: VS Debug Disabling when SetTempDirectory was called [1409]

$
0
0
I am use latest Magick.NET-16-AnyCPU library only for loading images in different formats, init code is:
```
StartupPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

string TempDirectory = Path.Combine(StartupPath, "Temp");
if (!Directory.Exists(TempDirectory))
Directory.CreateDirectory(TempDirectory);

MagickAnyCPU.CacheDirectory = StartupPath;
MagickAnyCPU.HasSharedCacheDirectory = false;
MagickNET.SetTempDirectory(TempDirectory);

/* int[] A = new int[1]; //VS stop Debug there!!!
A[4] = 0; */
```
as result if program have some exception before "MagickNET.SetTempDirectory(TempDirectory);", debug stopped at line with it, else (after SetTempDirectory) - see attached ScreenShot.
Comments: This feels like an issue in Visual Studio. Is it possible to create a memory dump?

Commented Unassigned: VS Debug Disabling when SetTempDirectory was called [1409]

$
0
0
I am use latest Magick.NET-16-AnyCPU library only for loading images in different formats, init code is:
```
StartupPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

string TempDirectory = Path.Combine(StartupPath, "Temp");
if (!Directory.Exists(TempDirectory))
Directory.CreateDirectory(TempDirectory);

MagickAnyCPU.CacheDirectory = StartupPath;
MagickAnyCPU.HasSharedCacheDirectory = false;
MagickNET.SetTempDirectory(TempDirectory);

/* int[] A = new int[1]; //VS stop Debug there!!!
A[4] = 0; */
```
as result if program have some exception before "MagickNET.SetTempDirectory(TempDirectory);", debug stopped at line with it, else (after SetTempDirectory) - see attached ScreenShot.
Comments: Yes, you are right, problem in Visual Studio or Visual Studio Debugger. I try run app from folder and app have exceptions, all works. In Visual Studio - NO(. Thanks for help and cool wrapper))

Commented Unassigned: VS Debug Disabling when SetTempDirectory was called [1409]

$
0
0
I am use latest Magick.NET-16-AnyCPU library only for loading images in different formats, init code is:
```
StartupPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

string TempDirectory = Path.Combine(StartupPath, "Temp");
if (!Directory.Exists(TempDirectory))
Directory.CreateDirectory(TempDirectory);

MagickAnyCPU.CacheDirectory = StartupPath;
MagickAnyCPU.HasSharedCacheDirectory = false;
MagickNET.SetTempDirectory(TempDirectory);

/* int[] A = new int[1]; //VS stop Debug there!!!
A[4] = 0; */
```
as result if program have some exception before "MagickNET.SetTempDirectory(TempDirectory);", debug stopped at line with it, else (after SetTempDirectory) - see attached ScreenShot.
Comments: I'll close this issue now then. Thanks for your prompt response to my questions.

Closed Unassigned: VS Debug Disabling when SetTempDirectory was called [1409]

$
0
0
I am use latest Magick.NET-16-AnyCPU library only for loading images in different formats, init code is:
```
StartupPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

string TempDirectory = Path.Combine(StartupPath, "Temp");
if (!Directory.Exists(TempDirectory))
Directory.CreateDirectory(TempDirectory);

MagickAnyCPU.CacheDirectory = StartupPath;
MagickAnyCPU.HasSharedCacheDirectory = false;
MagickNET.SetTempDirectory(TempDirectory);

/* int[] A = new int[1]; //VS stop Debug there!!!
A[4] = 0; */
```
as result if program have some exception before "MagickNET.SetTempDirectory(TempDirectory);", debug stopped at line with it, else (after SetTempDirectory) - see attached ScreenShot.

Created Unassigned: Draw() causes single channel image to become quad channel [1411]

$
0
0
I have a grayscale image, upon which I'm writing a string. While the drawing happens correctly, as soon as the Draw() method is called - whether for text, a line, or anything else - the single channel grayscale becomes an RGBA image.

To diagnose, I called GetPixels().ToArray().Length before and after the Draw() call. The image is a 1029 x 1029 image.

Before: 1058841
After: 4235364

Sample code
```
image.ColorSpace = ColorSpace.Gray;
image.ColorType = ColorType.Grayscale;
Console.Write(image.GetPixels().ToArray().Length);
image.Settings.ColorType = ColorType.Grayscale;
image.Settings.FontFamily = "Lato";
image.Settings.TextGravity = Gravity.Center;
image.Draw(new Drawables().Text(0, 0, "Test"));
image.Draw(new DrawableLine(0, 0, 1029, 1029));
Console.Write(image.GetPixels().ToArray().Length));
```

Also, if I force it back to ColorSpace.Gray after all this code is called, the array returns: 2117682. Safe to assume this is an alpha channel included with the gray channel.

Commented Unassigned: Draw() causes single channel image to become quad channel [1411]

$
0
0
I have a grayscale image, upon which I'm writing a string. While the drawing happens correctly, as soon as the Draw() method is called - whether for text, a line, or anything else - the single channel grayscale becomes an RGBA image.

To diagnose, I called GetPixels().ToArray().Length before and after the Draw() call. The image is a 1029 x 1029 image.

Before: 1058841
After: 4235364

Sample code
```
image.ColorSpace = ColorSpace.Gray;
image.ColorType = ColorType.Grayscale;
Console.Write(image.GetPixels().ToArray().Length);
image.Settings.ColorType = ColorType.Grayscale;
image.Settings.FontFamily = "Lato";
image.Settings.TextGravity = Gravity.Center;
image.Draw(new Drawables().Text(0, 0, "Test"));
image.Draw(new DrawableLine(0, 0, 1029, 1029));
Console.Write(image.GetPixels().ToArray().Length));
```

Also, if I force it back to ColorSpace.Gray after all this code is called, the array returns: 2117682. Safe to assume this is an alpha channel included with the gray channel.
Comments: This is the expected behavior. The Draw methods will turn on image into RGBA for a better result. Turning the alpha channel off and setting the colorspace to gray should get you back to a single channel.

Created Unassigned: PixelCollection.Set() sets all the pixels to (0,0,0) after the first call. [1412]

$
0
0
Hi, i load a .hdr image in a MagickImage and then change the value of a pixel to {0,0,0} (the image has 3 channels. What happens is that after the first pixelCol.Set(x,y, black) everything becomes (0,0,0). I can't understand why. The sample code is reported here:
```
void mymethod(ref MagickImage image, double[][] pixelSet, float[] black)
PixelCollection ps = image.GetPixels();
Pixel p;
foreach (double[] pixel in pixelSet)
{
if (mycondition)
{
p = ps.GetPixel((int)pixel[X_COMP], (int)pixel[Y_COMP]);
Console.WriteLine("Before: " +p.ToColor().R + " " + p.ToColor().G + " " + p.ToColor().B);
ps.Set((int)pixel[X_COMP], (int)pixel[Y_COMP], black);
p = ps.GetPixel((int)pixel[X_COMP], (int)pixel[Y_COMP]);
Console.WriteLine("After: " +p.ToColor().R + " " + p.ToColor().G + " " + p.ToColor().B);
}
}
```

The code returns
> Before: regularfloat regularfloat regularfloat
> After: zero zero zero
For the first iteration, and
> Before: zero zero zero
> After: zero zero zero
For all the others iterations. I tried skipping the first iteration and the result is the same but starting from the second iteration.

Edited Unassigned: PixelCollection.Set() sets all the pixels to (0,0,0) after the first call. [1412]

$
0
0
Hi, i load a .hdr image in a MagickImage and then change the value of a pixel to {0,0,0} (the image has 3 channels. What happens is that after the first pixelCol.Set(x,y, black) everything becomes (0,0,0). I can't understand why. The sample code is reported here:
```
void mymethod(ref MagickImage image, double[][] pixelSet, float[] black)
PixelCollection ps = image.GetPixels();
Pixel p;
foreach (double[] pixel in pixelSet)
{
if (mycondition)
{
p = ps.GetPixel((int)pixel[X_COMP], (int)pixel[Y_COMP]);
Console.WriteLine("Before: " +p.ToColor().R + " " + p.ToColor().G + " " + p.ToColor().B);
ps.Set((int)pixel[X_COMP], (int)pixel[Y_COMP], black);
p = ps.GetPixel((int)pixel[X_COMP], (int)pixel[Y_COMP]);
Console.WriteLine("After: " +p.ToColor().R + " " + p.ToColor().G + " " + p.ToColor().B);
}
}
```

The code returns
> Before: regularfloat regularfloat regularfloat
After: zero zero zero

For the first iteration, and

> Before: zero zero zero
After: zero zero zero
For all the others iterations. I tried skipping the first iteration and the result is the same but starting from the second iteration.

Edited Unassigned: PixelCollection.Set() sets all the pixels to (0,0,0) after the first call. [1412]

$
0
0
Hi, i load a .hdr image in a MagickImage and then change the value of a pixel to {0,0,0} (the image has 3 channels. What happens is that after the first pixelCol.Set(x,y, black) everything becomes (0,0,0). I can't understand why. The sample code is reported here:
```
void mymethod(ref MagickImage image, double[][] pixelSet, float[] black)
PixelCollection ps = image.GetPixels();
Pixel p;
foreach (double[] pixel in pixelSet)
{
if (mycondition)
{
p = ps.GetPixel((int)pixel[X_COMP], (int)pixel[Y_COMP]);
Console.WriteLine("Before: " +p.ToColor().R + " " + p.ToColor().G + " " + p.ToColor().B);
ps.Set((int)pixel[X_COMP], (int)pixel[Y_COMP], black);
p = ps.GetPixel((int)pixel[X_COMP], (int)pixel[Y_COMP]);
Console.WriteLine("After: " +p.ToColor().R + " " + p.ToColor().G + " " + p.ToColor().B);
}
}
```

The code returns
> Before: regularfloat regularfloat regularfloat
After: zero zero zero

For the first iteration, and

> Before: zero zero zero
After: zero zero zero

For all the others iterations. I tried skipping the first iteration and the result is the same but starting from the second iteration.

Commented Unassigned: PixelCollection.Set() sets all the pixels to (0,0,0) after the first call. [1412]

$
0
0
Hi, i load a .hdr image in a MagickImage and then change the value of a pixel to {0,0,0} (the image has 3 channels. What happens is that after the first pixelCol.Set(x,y, black) everything becomes (0,0,0). I can't understand why. The sample code is reported here:
```
void mymethod(ref MagickImage image, double[][] pixelSet, float[] black)
PixelCollection ps = image.GetPixels();
Pixel p;
foreach (double[] pixel in pixelSet)
{
if (mycondition)
{
p = ps.GetPixel((int)pixel[X_COMP], (int)pixel[Y_COMP]);
Console.WriteLine("Before: " +p.ToColor().R + " " + p.ToColor().G + " " + p.ToColor().B);
ps.Set((int)pixel[X_COMP], (int)pixel[Y_COMP], black);
p = ps.GetPixel((int)pixel[X_COMP], (int)pixel[Y_COMP]);
Console.WriteLine("After: " +p.ToColor().R + " " + p.ToColor().G + " " + p.ToColor().B);
}
}
```

The code returns
> Before: regularfloat regularfloat regularfloat
After: zero zero zero

For the first iteration, and

> Before: zero zero zero
After: zero zero zero

For all the others iterations. I tried skipping the first iteration and the result is the same but starting from the second iteration.
Comments: Are you sure that the values of pixelSet are correct. I cannot reproduce your issue with the following code: ```C# using (MagickImage image = new MagickImage("logo:")) { using (PixelCollection ps = image.GetPixels()) { float[] black = new float[] { 0, 0, 0 }; Pixel p = ps.GetPixel(0, 0); Console.WriteLine("Before: " + p.ToColor().R + " " + p.ToColor().G + " " + p.ToColor().B); ps.Set(0, 0, black); p = ps.GetPixel(0, 0); Console.WriteLine("After: " + p.ToColor().R + " " + p.ToColor().G + " " + p.ToColor().B); p = ps.GetPixel(1, 1); Console.WriteLine("Other: " + p.ToColor().R + " " + p.ToColor().G + " " + p.ToColor().B); } } ```

Created Unassigned: magick.net montage tile [1413]

$
0
0
hey,
i need to know how i can set tile setting in montage
(tile in the cmd say how much image in a row in montage )
this is for make sprite image from multi images

tanks in adv
yotav

Closed Unassigned: magick.net montage tile [1413]

$
0
0
hey,
i need to know how i can set tile setting in montage
(tile in the cmd say how much image in a row in montage )
this is for make sprite image from multi images

tanks in adv
yotav
Comments: Can you use the discussions board instead? https://magick.codeplex.com/discussions

Closed Unassigned: Draw() causes single channel image to become quad channel [1411]

$
0
0
I have a grayscale image, upon which I'm writing a string. While the drawing happens correctly, as soon as the Draw() method is called - whether for text, a line, or anything else - the single channel grayscale becomes an RGBA image.

To diagnose, I called GetPixels().ToArray().Length before and after the Draw() call. The image is a 1029 x 1029 image.

Before: 1058841
After: 4235364

Sample code
```
image.ColorSpace = ColorSpace.Gray;
image.ColorType = ColorType.Grayscale;
Console.Write(image.GetPixels().ToArray().Length);
image.Settings.ColorType = ColorType.Grayscale;
image.Settings.FontFamily = "Lato";
image.Settings.TextGravity = Gravity.Center;
image.Draw(new Drawables().Text(0, 0, "Test"));
image.Draw(new DrawableLine(0, 0, 1029, 1029));
Console.Write(image.GetPixels().ToArray().Length));
```

Also, if I force it back to ColorSpace.Gray after all this code is called, the array returns: 2117682. Safe to assume this is an alpha channel included with the gray channel.

Commented Unassigned: PixelCollection.Set() sets all the pixels to (0,0,0) after the first call. [1412]

$
0
0
Hi, i load a .hdr image in a MagickImage and then change the value of a pixel to {0,0,0} (the image has 3 channels. What happens is that after the first pixelCol.Set(x,y, black) everything becomes (0,0,0). I can't understand why. The sample code is reported here:
```
void mymethod(ref MagickImage image, double[][] pixelSet, float[] black)
PixelCollection ps = image.GetPixels();
Pixel p;
foreach (double[] pixel in pixelSet)
{
if (mycondition)
{
p = ps.GetPixel((int)pixel[X_COMP], (int)pixel[Y_COMP]);
Console.WriteLine("Before: " +p.ToColor().R + " " + p.ToColor().G + " " + p.ToColor().B);
ps.Set((int)pixel[X_COMP], (int)pixel[Y_COMP], black);
p = ps.GetPixel((int)pixel[X_COMP], (int)pixel[Y_COMP]);
Console.WriteLine("After: " +p.ToColor().R + " " + p.ToColor().G + " " + p.ToColor().B);
}
}
```

The code returns
> Before: regularfloat regularfloat regularfloat
After: zero zero zero

For the first iteration, and

> Before: zero zero zero
After: zero zero zero

For all the others iterations. I tried skipping the first iteration and the result is the same but starting from the second iteration.
Comments: Can I close this issue @Alakanu?

Commented Unassigned: Issue when converting a PDF to PNG [1394]

$
0
0
I have noticed issues when converting large PDF (3.5MB and higher) that it freezes the system, and in the course of 5 minutes will create temp files over 10GB in size.

Let me know if you need any info
Comments: When you append the images you will need to load all off them. If you have too many images it will be cached on disk instead of memory.
Viewing all 1011 articles
Browse latest View live


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