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

Commented Unassigned: Insufficient memory (case 4) [1421]

$
0
0
Hi,

I'm using Magick.net in a very high volume multi threaded photo processing application. I see random errors like below. This usually on photos that are larger, I have to deal with JPG files that are sometimes up to 40 megabytes in file size. But, i can see errors like this even on 5 megabyte files. The servers have plenty of memory. Is there anything i can do to avoid this other than forcing the application to only process one photo at a time?

I am using Magick.Net-Q16-AnyCPU version 7.0.3.902


ImageMagick.MagickCorruptImageErrorException\",\"Message\":\"Insufficient memory (case 4)
at ImageMagick.MagickImage.NativeMagickImage.WriteBlob(MagickSettings settings, UIntPtr& length)
at ImageMagick.MagickImage.Write(Stream stream)
Comments: It looks like you are reading from a stream. Would it be possible to read from a file? I don't know which part of the code is complaining about this but it looks like you are running into problems when the stream has to be send allocated inside the unmanaged code. I am planning to see if I can change the ImageMagick code to add support for better reading and writing of streams: https://github.com/dlemstra/Magick.NET/issues/35. For now I would advise you to switch to a file instead.

Commented Unassigned: Insufficient memory (case 4) [1421]

$
0
0
Hi,

I'm using Magick.net in a very high volume multi threaded photo processing application. I see random errors like below. This usually on photos that are larger, I have to deal with JPG files that are sometimes up to 40 megabytes in file size. But, i can see errors like this even on 5 megabyte files. The servers have plenty of memory. Is there anything i can do to avoid this other than forcing the application to only process one photo at a time?

I am using Magick.Net-Q16-AnyCPU version 7.0.3.902


ImageMagick.MagickCorruptImageErrorException\",\"Message\":\"Insufficient memory (case 4)
at ImageMagick.MagickImage.NativeMagickImage.WriteBlob(MagickSettings settings, UIntPtr& length)
at ImageMagick.MagickImage.Write(Stream stream)
Comments: Thank you very much for your response. Yes through out the entire application i am dealing with the JPGs as Memory streams and never on disk. So every magick.net operation is stream based or byte array based. This is because the files live on AWS S3 and there are multiple servers that perform different operations on the files so each server never holds the physical files locally. The bring the file bytes down over HTTP perform jobs on the JPG and push the bytes back over HTTP. I could change it around to bring the bytes down and into a temporary jpg files i guess but that would slow things down. I'll experiment a bit.

Commented Unassigned: Unable to create 8-bit grayscale JPEG-2000 images [1420]

$
0
0
As I discuss in [this post](https://magick.codeplex.com/discussions/660276) and these ImageMagick forum posts (the ["Users" forum](https://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=31094); as well as the ["Magick.NET" forum](https://www.imagemagick.org/discourse-server/viewtopic.php?f=27&t=31095)), I am unable to successfully create 8-bit grayscale JPEG-2000 images in Magick.NET.

I __am__ able to successfully create 8-bit grayscale images via the command line in ImageMagick, so I believe the problem is not a deeper issue with ImageMagick. Rather, Magick.NET does not respect commands to change the Color.

With certain commands (see my discussion linked above in the Magick.NET forum), the JPEG-2000 metadata changes, but the file size does not change appreciably, suggesting that the actual imagery data being written is not changing. With other commands, neither the metadata nor the file size change.
Comments: Can I close this issue @djc88?

Commented Unassigned: Insufficient memory (case 4) [1421]

$
0
0
Hi,

I'm using Magick.net in a very high volume multi threaded photo processing application. I see random errors like below. This usually on photos that are larger, I have to deal with JPG files that are sometimes up to 40 megabytes in file size. But, i can see errors like this even on 5 megabyte files. The servers have plenty of memory. Is there anything i can do to avoid this other than forcing the application to only process one photo at a time?

I am using Magick.Net-Q16-AnyCPU version 7.0.3.902


ImageMagick.MagickCorruptImageErrorException\",\"Message\":\"Insufficient memory (case 4)
at ImageMagick.MagickImage.NativeMagickImage.WriteBlob(MagickSettings settings, UIntPtr& length)
at ImageMagick.MagickImage.Write(Stream stream)
Comments: I changed all the .Write() calls i had from Stream based to FileInfo baseed. So from .Write(Stream) to .Write(FileInfo). I then still got out of memory exception in the Write method. I then created a lock object and ensured that only one single Write call could ever execute at a time and i still get out of memory exceptions. There other simultaneous uses of Magic.Net objects going on in parallel at the same time but no other writes. The .Net process is using about 2 gigs of the available 16 gigs on the server and never goes above that.

Commented Unassigned: Insufficient memory (case 4) [1421]

$
0
0
Hi,

I'm using Magick.net in a very high volume multi threaded photo processing application. I see random errors like below. This usually on photos that are larger, I have to deal with JPG files that are sometimes up to 40 megabytes in file size. But, i can see errors like this even on 5 megabyte files. The servers have plenty of memory. Is there anything i can do to avoid this other than forcing the application to only process one photo at a time?

I am using Magick.Net-Q16-AnyCPU version 7.0.3.902


ImageMagick.MagickCorruptImageErrorException\",\"Message\":\"Insufficient memory (case 4)
at ImageMagick.MagickImage.NativeMagickImage.WriteBlob(MagickSettings settings, UIntPtr& length)
at ImageMagick.MagickImage.Write(Stream stream)
Comments: Are you running in 32-bit instead of 64-bit? p.s. Planning to work on adding better stream support this weekend.

Commented Unassigned: Insufficient memory (case 4) [1421]

$
0
0
Hi,

I'm using Magick.net in a very high volume multi threaded photo processing application. I see random errors like below. This usually on photos that are larger, I have to deal with JPG files that are sometimes up to 40 megabytes in file size. But, i can see errors like this even on 5 megabyte files. The servers have plenty of memory. Is there anything i can do to avoid this other than forcing the application to only process one photo at a time?

I am using Magick.Net-Q16-AnyCPU version 7.0.3.902


ImageMagick.MagickCorruptImageErrorException\",\"Message\":\"Insufficient memory (case 4)
at ImageMagick.MagickImage.NativeMagickImage.WriteBlob(MagickSettings settings, UIntPtr& length)
at ImageMagick.MagickImage.Write(Stream stream)
Comments: You got it! Thanks to my code changes to use temp files i happened to watch the temp folder while the process was running to make sure it wasn't orphaning any temporary jpg files. By the good graces of god guess what else i noticed sitting in the temp folder? I noticed that magic.net had unpacked the 32 bit DLL and not the 64 bit one. So... the windows service was running in 32-bit and capped at 2 gigs. I guess the .Write() calls are the most expensive and suffered from this limit. Was caused by a default build option being checked to "Prefer 32 bit" on the service's CSProj properties. I've now removed the temp files and the locking and am testing how many more files i can process at once without getting memory errors. In a round about way your suggestion to use files instead of streams led to this getting figured out and it's appreciated!

Created Unassigned: Arithmetic operation resulted in an overflow [1422]

$
0
0
Hi, I'm using Magick.NET (NuGet package: `Magick.NET-Q16-x64`) to retrieve image information from a given image file.

Looks like this:
```
var info = new MagickImageInfo(stream); // exception gets thrown here
var dpix = info.Density.X;
```

Everything worked as expected the last months. But currently one image is breaking my code and is throwing an overflow exception.
Stacktrace:
```
System.OverflowException: Arithmetic operation resulted in an overflow.
at ImageMagick.MagickImage.NativeMagickImage.get_ResolutionUnits()
at ImageMagick.MagickImage.get_Density()
at ImageMagick.MagickImageInfo.Initialize(MagickImage image)
at ImageMagick.MagickImageInfo.Read(Stream stream)
```
The image which causes the exception: https://testpublic.blob.core.windows.net/magicknet/BrokenImage.jpg

Commented Unassigned: Arithmetic operation resulted in an overflow [1422]

$
0
0
Hi, I'm using Magick.NET (NuGet package: `Magick.NET-Q16-x64`) to retrieve image information from a given image file.

Looks like this:
```
var info = new MagickImageInfo(stream); // exception gets thrown here
var dpix = info.Density.X;
```

Everything worked as expected the last months. But currently one image is breaking my code and is throwing an overflow exception.
Stacktrace:
```
System.OverflowException: Arithmetic operation resulted in an overflow.
at ImageMagick.MagickImage.NativeMagickImage.get_ResolutionUnits()
at ImageMagick.MagickImage.get_Density()
at ImageMagick.MagickImageInfo.Initialize(MagickImage image)
at ImageMagick.MagickImageInfo.Read(Stream stream)
```
The image which causes the exception: https://testpublic.blob.core.windows.net/magicknet/BrokenImage.jpg
Comments: Issue resolved with upgrade to version `7.0.4.400`

Closed Unassigned: Arithmetic operation resulted in an overflow [1422]

$
0
0
Hi, I'm using Magick.NET (NuGet package: `Magick.NET-Q16-x64`) to retrieve image information from a given image file.

Looks like this:
```
var info = new MagickImageInfo(stream); // exception gets thrown here
var dpix = info.Density.X;
```

Everything worked as expected the last months. But currently one image is breaking my code and is throwing an overflow exception.
Stacktrace:
```
System.OverflowException: Arithmetic operation resulted in an overflow.
at ImageMagick.MagickImage.NativeMagickImage.get_ResolutionUnits()
at ImageMagick.MagickImage.get_Density()
at ImageMagick.MagickImageInfo.Initialize(MagickImage image)
at ImageMagick.MagickImageInfo.Read(Stream stream)
```
The image which causes the exception: https://testpublic.blob.core.windows.net/magicknet/BrokenImage.jpg

Commented Unassigned: Insufficient memory (case 4) [1421]

$
0
0
Hi,

I'm using Magick.net in a very high volume multi threaded photo processing application. I see random errors like below. This usually on photos that are larger, I have to deal with JPG files that are sometimes up to 40 megabytes in file size. But, i can see errors like this even on 5 megabyte files. The servers have plenty of memory. Is there anything i can do to avoid this other than forcing the application to only process one photo at a time?

I am using Magick.Net-Q16-AnyCPU version 7.0.3.902


ImageMagick.MagickCorruptImageErrorException\",\"Message\":\"Insufficient memory (case 4)
at ImageMagick.MagickImage.NativeMagickImage.WriteBlob(MagickSettings settings, UIntPtr& length)
at ImageMagick.MagickImage.Write(Stream stream)
Comments: I just implemented issue 35 on github. This will be available in the next version of Magick.NET. Closing this issue now.

Closed Unassigned: Insufficient memory (case 4) [1421]

$
0
0
Hi,

I'm using Magick.net in a very high volume multi threaded photo processing application. I see random errors like below. This usually on photos that are larger, I have to deal with JPG files that are sometimes up to 40 megabytes in file size. But, i can see errors like this even on 5 megabyte files. The servers have plenty of memory. Is there anything i can do to avoid this other than forcing the application to only process one photo at a time?

I am using Magick.Net-Q16-AnyCPU version 7.0.3.902


ImageMagick.MagickCorruptImageErrorException\",\"Message\":\"Insufficient memory (case 4)
at ImageMagick.MagickImage.NativeMagickImage.WriteBlob(MagickSettings settings, UIntPtr& length)
at ImageMagick.MagickImage.Write(Stream stream)

Created Unassigned: TIF convert to pdf colour change [1423]

$
0
0
I have been trying to convert a TIF file in Lab colorspace to PDF format, but the converted file has the colors changed.

Note: I also do a bit of resizing before converting to PDF.


Edited Unassigned: TIF convert to pdf colour change [1423]

$
0
0
I have been trying to convert a TIF file in Lab colorspace to PDF format, but the converted file has the colors changed.

When converting to PDF, I end up with a file like [Tiff-Lab-300DPI.tif_ImageConverter.pdf]..

Note: I also do a bit of resizing before converting to PDF.


Closed Unassigned: Unable to create 8-bit grayscale JPEG-2000 images [1420]

$
0
0
As I discuss in [this post](https://magick.codeplex.com/discussions/660276) and these ImageMagick forum posts (the ["Users" forum](https://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=31094); as well as the ["Magick.NET" forum](https://www.imagemagick.org/discourse-server/viewtopic.php?f=27&t=31095)), I am unable to successfully create 8-bit grayscale JPEG-2000 images in Magick.NET.

I __am__ able to successfully create 8-bit grayscale images via the command line in ImageMagick, so I believe the problem is not a deeper issue with ImageMagick. Rather, Magick.NET does not respect commands to change the Color.

With certain commands (see my discussion linked above in the Magick.NET forum), the JPEG-2000 metadata changes, but the file size does not change appreciably, suggesting that the actual imagery data being written is not changing. With other commands, neither the metadata nor the file size change.

Commented Unassigned: TIF convert to pdf colour change [1423]

$
0
0
I have been trying to convert a TIF file in Lab colorspace to PDF format, but the converted file has the colors changed.

When converting to PDF, I end up with a file like [Tiff-Lab-300DPI.tif_ImageConverter.pdf]..

Note: I also do a bit of resizing before converting to PDF.


Comments: I can reproduce your issue. Changing the ColorSpace of the image to srgb solves the issue. I wonder why the PDF document is using the wrong colorspace. I will need to investigate this some more. I will come back to this topic when I have more info.

Created Unassigned: Canon specific EXIF values [1424]

$
0
0
When i use comand line exiftool to dump all of the metadata from this JPG i see two specific fields i really want to get. They are in a profile listed by exiftool as "Canon"

Time Zone : -05:00
Time Zone City : New York

When i'm using Magic.net if i get all of the available profiles for the JPG which i'm told are "exif" and "xmp" and loop through all available tags of both i don't see these tags or values and i've got no other tags that will give me the timezone. I'm attaching the JPG and the exiftool's dump file. I'd really love a way to be able to get those two values out otherwise i have no way to know which timezone the date/time fields i'm pulling from EXIF are in.


Commented Unassigned: Canon specific EXIF values [1424]

$
0
0
When i use comand line exiftool to dump all of the metadata from this JPG i see two specific fields i really want to get. They are in a profile listed by exiftool as "Canon"

Time Zone : -05:00
Time Zone City : New York

When i'm using Magic.net if i get all of the available profiles for the JPG which i'm told are "exif" and "xmp" and loop through all available tags of both i don't see these tags or values and i've got no other tags that will give me the timezone. I'm attaching the JPG and the exiftool's dump file. I'd really love a way to be able to get those two values out otherwise i have no way to know which timezone the date/time fields i'm pulling from EXIF are in.


Comments: Crap, the JPG is too big to attach it's 7.3 MB, i'm afraid to resize it and save it again in photoshop because photoshop will redo the metadata in side the jpg.

Commented Unassigned: Canon specific EXIF values [1424]

$
0
0
When i use comand line exiftool to dump all of the metadata from this JPG i see two specific fields i really want to get. They are in a profile listed by exiftool as "Canon"

Time Zone : -05:00
Time Zone City : New York

When i'm using Magic.net if i get all of the available profiles for the JPG which i'm told are "exif" and "xmp" and loop through all available tags of both i don't see these tags or values and i've got no other tags that will give me the timezone. I'm attaching the JPG and the exiftool's dump file. I'd really love a way to be able to get those two values out otherwise i have no way to know which timezone the date/time fields i'm pulling from EXIF are in.


Comments: Here is a second smaller JPG demonstrating the same problem. I'm going to attach the exiftool dump showing those two Canon EXIF tags and the JPG.

Commented Unassigned: Canon specific EXIF values [1424]

$
0
0
When i use comand line exiftool to dump all of the metadata from this JPG i see two specific fields i really want to get. They are in a profile listed by exiftool as "Canon"

Time Zone : -05:00
Time Zone City : New York

When i'm using Magic.net if i get all of the available profiles for the JPG which i'm told are "exif" and "xmp" and loop through all available tags of both i don't see these tags or values and i've got no other tags that will give me the timezone. I'm attaching the JPG and the exiftool's dump file. I'd really love a way to be able to get those two values out otherwise i have no way to know which timezone the date/time fields i'm pulling from EXIF are in.


Comments: jpg

Commented Unassigned: Canon specific EXIF values [1424]

$
0
0
When i use comand line exiftool to dump all of the metadata from this JPG i see two specific fields i really want to get. They are in a profile listed by exiftool as "Canon"

Time Zone : -05:00
Time Zone City : New York

When i'm using Magic.net if i get all of the available profiles for the JPG which i'm told are "exif" and "xmp" and loop through all available tags of both i don't see these tags or values and i've got no other tags that will give me the timezone. I'm attaching the JPG and the exiftool's dump file. I'd really love a way to be able to get those two values out otherwise i have no way to know which timezone the date/time fields i'm pulling from EXIF are in.


Comments: The Canon specific information is stored inside the ExifTag.MakerNote. I might be able to add something for that in the future but it's going to be a lot of work. For now you will need to parse that yourself. I tried to parse the data but I am getting an incorrect offset at some point and I will let you figure out how to resolve that. I hope you will come back here with the answer though :) Here is my code sample: ```C# using (MagickImage image = new MagickImage("1MR1215.jpg")) { ExifProfile profile = image.GetExifProfile(); ExifValue markerNote = profile.GetValue(ExifTag.MakerNote); byte[] data = (byte[])markerNote.Value; ushort count = BitConverter.ToUInt16(data, 0); int offset = 2; int start = offset + (count * 12); for (ushort i = 0; i < count; i++) { ushort id = BitConverter.ToUInt16(data, offset); offset += 8; // ID list at: http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Canon.html if (id == 0x0035) // TimeInfo { int dataOffset = (int)BitConverter.ToUInt32(data, offset); // dataOffset = 3892 but should be 2850 ??? dataOffset = 2850; // http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/Canon.html#TimeInfo int timeZone = BitConverter.ToInt32(data, dataOffset); // -300 => -300 / 60 = -5 int timeZoneCity = BitConverter.ToInt32(data, dataOffset + 4); // 27 = New York int daylightSavings = BitConverter.ToInt32(data, dataOffset + 8); // 0 = Off } offset += 4; } } ```
Viewing all 1011 articles
Browse latest View live


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