--
You received this message because you are subscribed to the Google Groups "tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscribe@googlegroups.com.
To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/dcfe7918-707b-4b56-9720-b3e39ae1a658%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-oc...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscribe@googlegroups.com.
To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/79f1f939-9fd3-4869-8dbd-15945a91591a%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscribe@googlegroups.com.
To post to this group, send email to tesser...@googlegroups.com.
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/21e32c9f-ec89-44db-be3d-d16ad771063b%40googlegroups.com.
>> BitmapToPixConverter b = new BitmapToPixConverter();>>Pix pix = b.Convert(bitmap);
This is not leptonica code. It shouldn't compile, with b being a ptr that is dereferenced with a ".". This is then set equal to a pix which is (as written) not a ptr either, causing a copy if it were correct.
public static Pix Create(int width, int height, int depth)
{
if (!AllowedDepths.Contains(depth))
throw new ArgumentException("Depth must be 1, 2, 4, 8, 16, or 32 bits.", "depth");
if (width <= 0) throw new ArgumentException("Width must be greater than zero", "width");
if (height <= 0) throw new ArgumentException("Height must be greater than zero", "height");
var handle = Interop.LeptonicaApi.Native.pixCreate(width, height, depth);
if (handle == IntPtr.Zero) throw new InvalidOperationException("Failed to create pix, this normally occurs because the requested image size is too large, please check Standard Error Output.");
return Create(handle);
}