No Easy way To Create a blank MagickImage. #1790
Unanswered
jdmsolarius
asked this question in
General
Replies: 1 comment
-
Why are you setting |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The only Constructor I could find
static internal MagickImage _MagickImage = new MagickImage(MagickColors.Black, 2048, 2048) { Depth = 16, HasAlpha = false, Format = MagickFormat.Tiff, ColorType = ColorType.Grayscale, ColorSpace=ColorSpace.Gray };
This was confusing because Almost every Imaging Library has a constructor for Length and Width that allows me to create an In-Memory array.Takes 105 Milliseconds when I run it but Loading the Actual Tiff File (which has these attributes) only takes ~10 milliseconds, Loading the Byte Array only takes ~8 Milliseconds. Can you speak to this at all? By Comparison
Constructing a 2048x2048 Bitmap with PixelFormat24bppRGB takes 5 Milliseconds.
Constructing a 2048x2048 OpenCVMatrix with MatType 16CVU1 takes 3 Milliseconds.
The interesting thing is that MagickImage is faster than these other Libraries when there is an actual Image** for reference the reason I want a Template is that I can Load a MagickImage in 2-2.5 Milliseconds (at least 4X Faster on Average) if I Clone a Template and write Data to that Template in Parallel on a 12 Core Machine. On a 16 Core Machine this number is ~1.7.
Beta Was this translation helpful? Give feedback.
All reactions