I'm trying to create a new MagickIMage object from some raw CMYK Data.
In order to do so, i'm creating some PixelStorageSettings (as i learned before somewhere else, i think on some MagickImage doc site).
However, if i create the PixelStorageSettings with their original size, i get an error saying the array length is wrong
To be more specific:
The image width is 1497, height 1216
The data is 1,820,510 bytes
When i try to create it, the exception thrown is:
"System.ArgumentException: 'The array length is 1820352 but should be at least 7281408."
But i don't have any more data rather than this. The data stripped from the file is this. Nothing else more.
I did an test dividing width and height by two ; when i did that i was able to create the image.
Is there anything i'm missing ?
I'm posting my code here as well link to the files:
Code: Select all
var currSettings = new PixelStorageSettings(1497, 1216, StorageType.Char,PixelMapping.CMYK); MagickImage cyan = new MagickImage(@"C:\test\cyantwo.raw",currSettings); MagickImage magenta = new MagickImage(@"C:\test\magentatwo.raw", currSettings); MagickImage yellow = new MagickImage(@"C:\test\yellowtwo.raw", currSettings); MagickImage black = new MagickImage(@"C:\test\blacktwo.raw", currSettings);