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

Commented Unassigned: Issue on opening large image (>2GB Tiff) [1403]

$
0
0
Hi,

We are using magick.net for getting some image informations (get colorspace, bit per sample, etc.) and in some case, we have to transform the same files (dropped in our main app) to tiff. For getting info, we use the code below. On opening large Tiff (>2GB Tiff), we get instantly an OverflowException, Arithmetic operation resulted in an overflow. at ImageMagick.MagickReader.Read(Stream stream)

Any idea we can overcome this. We currently use the V6 of magick.net. Q8 - X64

The whole project is X64 based, not anyCpu.

```
FileStream imageStream = new FileStream(TiffFile, FileMode.Open, FileAccess.Read);
MagickImage currentImage;
ImageMagick.ColorSpace orgColorspace;

try
{
currentImage = new MagickImage(imageStream);
orgColorspace = currentImage.ColorSpace;

if (currentImage.ReadWarning != null)
{
log.Info("RipTiff : Warning on opening file : " + TiffFile + " : " + currentImage.ReadWarning.Message);
}
}
```
Comments: Thanks for sending me the file. With the latest version of Magick.NET I am able to open, resize and save the image. It takes a while because the size is 20950x26381 but it finishes without any complaints. p.s. If you just want the to know the colorspace it might be better to use the Ping method of MagickImage instead. This will not decode the pixels.

Edited Issue: Issue on opening large image (>2GB Tiff) [1403]

$
0
0
Hi,

We are using magick.net for getting some image informations (get colorspace, bit per sample, etc.) and in some case, we have to transform the same files (dropped in our main app) to tiff. For getting info, we use the code below. On opening large Tiff (>2GB Tiff), we get instantly an OverflowException, Arithmetic operation resulted in an overflow. at ImageMagick.MagickReader.Read(Stream stream)

Any idea we can overcome this. We currently use the V6 of magick.net. Q8 - X64

The whole project is X64 based, not anyCpu.

```
FileStream imageStream = new FileStream(TiffFile, FileMode.Open, FileAccess.Read);
MagickImage currentImage;
ImageMagick.ColorSpace orgColorspace;

try
{
currentImage = new MagickImage(imageStream);
orgColorspace = currentImage.ColorSpace;

if (currentImage.ReadWarning != null)
{
log.Info("RipTiff : Warning on opening file : " + TiffFile + " : " + currentImage.ReadWarning.Message);
}
}
```

Commented Issue: Issue on opening large image (>2GB Tiff) [1403]

$
0
0
Hi,

We are using magick.net for getting some image informations (get colorspace, bit per sample, etc.) and in some case, we have to transform the same files (dropped in our main app) to tiff. For getting info, we use the code below. On opening large Tiff (>2GB Tiff), we get instantly an OverflowException, Arithmetic operation resulted in an overflow. at ImageMagick.MagickReader.Read(Stream stream)

Any idea we can overcome this. We currently use the V6 of magick.net. Q8 - X64

The whole project is X64 based, not anyCpu.

```
FileStream imageStream = new FileStream(TiffFile, FileMode.Open, FileAccess.Read);
MagickImage currentImage;
ImageMagick.ColorSpace orgColorspace;

try
{
currentImage = new MagickImage(imageStream);
orgColorspace = currentImage.ColorSpace;

if (currentImage.ReadWarning != null)
{
log.Info("RipTiff : Warning on opening file : " + TiffFile + " : " + currentImage.ReadWarning.Message);
}
}
```
Comments: I did not realize you would run into a memory boundary when you use a stream instead of a file. The stream exceeds the maximum size (https://msdn.microsoft.com/en-us/library/hh285054(v=vs.110).aspx). Reading directly from file is better than reading from a filestream. When you read from a filestream the Magick.NET code will first put the file data in a byte array. This means that your application will probably use a lot of memory. It will probably be faster to read from file directly anyways. I modified the Magick.NET code to throw an exception when the stream size exceeds the maximum length of a byte array.

Closed Issue: Issue on opening large image (>2GB Tiff) [1403]

$
0
0
Hi,

We are using magick.net for getting some image informations (get colorspace, bit per sample, etc.) and in some case, we have to transform the same files (dropped in our main app) to tiff. For getting info, we use the code below. On opening large Tiff (>2GB Tiff), we get instantly an OverflowException, Arithmetic operation resulted in an overflow. at ImageMagick.MagickReader.Read(Stream stream)

Any idea we can overcome this. We currently use the V6 of magick.net. Q8 - X64

The whole project is X64 based, not anyCpu.

```
FileStream imageStream = new FileStream(TiffFile, FileMode.Open, FileAccess.Read);
MagickImage currentImage;
ImageMagick.ColorSpace orgColorspace;

try
{
currentImage = new MagickImage(imageStream);
orgColorspace = currentImage.ColorSpace;

if (currentImage.ReadWarning != null)
{
log.Info("RipTiff : Warning on opening file : " + TiffFile + " : " + currentImage.ReadWarning.Message);
}
}
```

Edited Unassigned: Frequently get Memory System.AccessViolationException error in NativeMethods.x64.MagickImageCollection_ReadFile [1399]

$
0
0
We are inspecting a large number of PDFs and frequently run into the following error memory corrupt errors on multiple machines. The errors are more frequent when the memory utilization is high OR there are multiple threads running.

Unhandled Exception: System.AccessViolationException: Attempted to read or write
protected memory. This is often an indication that other memory is corrupt.
at ImageMagick.MagickImageCollection.NativeMethods.X64.MagickImageCollection_
ReadFile(IntPtr settings, IntPtr& exception)
at ImageMagick.MagickImageCollection.NativeMagickImageCollection.ReadFile(Mag
ickSettings settings)
at ImageMagick.MagickImageCollection.AddImages(String fileName, MagickReadSet
tings readSettings, Boolean ping)

Please advise as we are seriously considering replacing this component as it has been persistent across versions.
Current File version that produced this error is 7.0.1.101



Created Unassigned: Level-Colors command [1404]

$
0
0
I want to use the +level-colors (note the + sign) but it seems to be the -level-colors (note the - sign) method that is exposed in Magick.NET.

I want to color a transparent image like this example "convert cow.gif +level-colors red, cow_red.gif" on http://www.imagemagick.org/Usage/color_mods/#level-colors (also note that the second argument is empty)

Is this possible, or is the feature missing?

Commented Unassigned: Level-Colors command [1404]

$
0
0
I want to use the +level-colors (note the + sign) but it seems to be the -level-colors (note the - sign) method that is exposed in Magick.NET.

I want to color a transparent image like this example "convert cow.gif +level-colors red, cow_red.gif" on http://www.imagemagick.org/Usage/color_mods/#level-colors (also note that the second argument is empty)

Is this possible, or is the feature missing?
Comments: `+level-colors` is the inverse of `-level-colors`. And that is why `+level-colors` is available as `InverseLevelColors`. I now wonder if I should rename that method to `LevelColorsInverse` to make it more clear that this method is available. When the second argument is empty it will default to `MagickColors.White` on the command line and for the first argument it will default to `MagickColors.Black`. This means your command would be translated to this: ```C# using (MagickImage image = new MagickImage("cow.gif")) { image.InverseLevelColors(MagickColors.Red, MagickColors.White); image.Write("cow_red.gif"); } ```

Edited Unassigned: Level-Colors command [1404]

$
0
0
I want to use the +level-colors (note the + sign) but it seems to be the -level-colors (note the - sign) method that is exposed in Magick.NET.

I want to color a transparent image like this example "convert cow.gif +level-colors red, cow_red.gif" on http://www.imagemagick.org/Usage/color_mods/#level-colors (also note that the second argument is empty)

Is this possible, or is the feature missing?

Created Unassigned: Resample Lowered Image Quality [1405]

$
0
0
I was working in Magick.NET trying to convert a 1000x1000px 300dpi image to a 72dpi image of the same dimensions. When converting directly from 300dpi to 72dpi using the Resample method, the image ends up with very poor quality. However, if I convert from 300dpi to 150dpi and then to 72dpi, the image ends up looking much better. Is there something I am missing or an upcoming fix for this issue?
Thank you,
Fabian

Commented Unassigned: Resample Lowered Image Quality [1405]

$
0
0
I was working in Magick.NET trying to convert a 1000x1000px 300dpi image to a 72dpi image of the same dimensions. When converting directly from 300dpi to 72dpi using the Resample method, the image ends up with very poor quality. However, if I convert from 300dpi to 150dpi and then to 72dpi, the image ends up looking much better. Is there something I am missing or an upcoming fix for this issue?
Thank you,
Fabian
Comments: Here is the 300dpi to 150dpi to 72dpi image

Commented Unassigned: Resample Lowered Image Quality [1405]

$
0
0
I was working in Magick.NET trying to convert a 1000x1000px 300dpi image to a 72dpi image of the same dimensions. When converting directly from 300dpi to 72dpi using the Resample method, the image ends up with very poor quality. However, if I convert from 300dpi to 150dpi and then to 72dpi, the image ends up looking much better. Is there something I am missing or an upcoming fix for this issue?
Thank you,
Fabian
Comments: Can you also share your original image?

Edited Unassigned: Resample Lowered Image Quality [1405]

$
0
0
I was working in Magick.NET trying to convert a 1000x1000px 300dpi image to a 72dpi image of the same dimensions. When converting directly from 300dpi to 72dpi using the Resample method, the image ends up with very poor quality. However, if I convert from 300dpi to 150dpi and then to 72dpi, the image ends up looking much better. Is there something I am missing or an upcoming fix for this issue?
Thank you,
Fabian

Commented Unassigned: Level-Colors command [1404]

$
0
0
I want to use the +level-colors (note the + sign) but it seems to be the -level-colors (note the - sign) method that is exposed in Magick.NET.

I want to color a transparent image like this example "convert cow.gif +level-colors red, cow_red.gif" on http://www.imagemagick.org/Usage/color_mods/#level-colors (also note that the second argument is empty)

Is this possible, or is the feature missing?
Comments: Thank you worked perfect :)

Closed Unassigned: Level-Colors command [1404]

$
0
0
I want to use the +level-colors (note the + sign) but it seems to be the -level-colors (note the - sign) method that is exposed in Magick.NET.

I want to color a transparent image like this example "convert cow.gif +level-colors red, cow_red.gif" on http://www.imagemagick.org/Usage/color_mods/#level-colors (also note that the second argument is empty)

Is this possible, or is the feature missing?

Closed Unassigned: Frequently get Memory System.AccessViolationException error in NativeMethods.x64.MagickImageCollection_ReadFile [1399]

$
0
0
We are inspecting a large number of PDFs and frequently run into the following error memory corrupt errors on multiple machines. The errors are more frequent when the memory utilization is high OR there are multiple threads running.

Unhandled Exception: System.AccessViolationException: Attempted to read or write
protected memory. This is often an indication that other memory is corrupt.
at ImageMagick.MagickImageCollection.NativeMethods.X64.MagickImageCollection_
ReadFile(IntPtr settings, IntPtr& exception)
at ImageMagick.MagickImageCollection.NativeMagickImageCollection.ReadFile(Mag
ickSettings settings)
at ImageMagick.MagickImageCollection.AddImages(String fileName, MagickReadSet
tings readSettings, Boolean ping)

Please advise as we are seriously considering replacing this component as it has been persistent across versions.
Current File version that produced this error is 7.0.1.101




Commented Unassigned: Resample Lowered Image Quality [1405]

$
0
0
I was working in Magick.NET trying to convert a 1000x1000px 300dpi image to a 72dpi image of the same dimensions. When converting directly from 300dpi to 72dpi using the Resample method, the image ends up with very poor quality. However, if I convert from 300dpi to 150dpi and then to 72dpi, the image ends up looking much better. Is there something I am missing or an upcoming fix for this issue?
Thank you,
Fabian
Comments: Yes, I attached it now

Commented Unassigned: Resample Lowered Image Quality [1405]

$
0
0
I was working in Magick.NET trying to convert a 1000x1000px 300dpi image to a 72dpi image of the same dimensions. When converting directly from 300dpi to 72dpi using the Resample method, the image ends up with very poor quality. However, if I convert from 300dpi to 150dpi and then to 72dpi, the image ends up looking much better. Is there something I am missing or an upcoming fix for this issue?
Thank you,
Fabian
Comments: When you resample the image you will resize it accordingly to the DPI. I have the feeling that you just want to change the DPI of the image instead. The code below will do that: ```C# using (MagickImage image = new MagickImage("300_dpi.jpg")) { image.Density = new Density(72); image.Write("72dpi_from_300_dpi.jpg"); } ```

Commented Unassigned: Resample Lowered Image Quality [1405]

$
0
0
I was working in Magick.NET trying to convert a 1000x1000px 300dpi image to a 72dpi image of the same dimensions. When converting directly from 300dpi to 72dpi using the Resample method, the image ends up with very poor quality. However, if I convert from 300dpi to 150dpi and then to 72dpi, the image ends up looking much better. Is there something I am missing or an upcoming fix for this issue?
Thank you,
Fabian
Comments: That worked, thank you!

Closed Unassigned: Resample Lowered Image Quality [1405]

$
0
0
I was working in Magick.NET trying to convert a 1000x1000px 300dpi image to a 72dpi image of the same dimensions. When converting directly from 300dpi to 72dpi using the Resample method, the image ends up with very poor quality. However, if I convert from 300dpi to 150dpi and then to 72dpi, the image ends up looking much better. Is there something I am missing or an upcoming fix for this issue?
Thank you,
Fabian

Created Unassigned: Error on Deployment [1406]

$
0
0
Hi,

I'm trying to move a solution on an IIS server, however when running, I get the following error:

System.TypeInitializationException: The type initializer for 'X64' threw an exception. ---> System.UnauthorizedAccessException: Access to the path 'C:\Windows\TEMP\Magick.NET.net40-client.7.0.0.0104\Magick.NET-Q16-x64.Native.dll' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at ImageMagick.NativeLibraryLoader.WriteAssembly(String tempFile)
at ImageMagick.NativeLibraryLoader.ExtractLibrary()
--- End of inner exception stack trace ---
at ImageMagick.MagickSettings.NativeMethods.X64.MagickSettings_Create()
at ImageMagick.MagickSettings.NativeMagickSettings..ctor()
at ImageMagick.MagickSettings..ctor()

I appreciate your cooperation as my PC deployed without any problem.

And I deployed the Visual C ++ Redistributable x86 and x64

Regards!
Viewing all 1011 articles
Browse latest View live


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