[Mono-dev] Remoting IplImage/Bitmap return type problem
buhochileno at gmail.com
buhochileno at gmail.com
Sat Nov 24 18:12:15 EST 2007
Hi:
I still have my problem about how to get the remoting object picture
from a client. First I try to make a property and a method to return a
Bitmap, but finally I only get "some class/type is not marked as
Serializable...", and now I try to use a IplImage from a basic OpenCv
implementation that I have for mono based on the SharpCV wrapper (yes,
the wrapper use IntPtr and DllImport native calls :-S. With my IplImage
test I allmost succed, in the client side I can make the asignation to a
local copy of the image, something like this:
CvImage frame = remOrbitKit.Video.LastIplFrame; //-> this is the remote
object property that return a "CvImage" picture type
..this work...
..but if I later try to show the image the applicatio crash with this:
Unhandled Exception: System.NotSupportedException: Unsupported primitive
type: System.IntPtr
Server stack trace:
at
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WritePrimitiveValue
(System.IO.BinaryWriter writer, System.Object value) [0x001b4] in
/mnt/data/opt/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs:898
at
System.Runtime.Serialization.Formatters.Binary.MessageFormatter.WriteMethodResponse
(System.IO.BinaryWriter writer, System.Object obj,
System.Runtime.Remoting.Messaging.Header[] headers, ISurrogateSelector
surrogateSelector, StreamingContext context, FormatterAssemblyStyle
assemblyFormat, FormatterTypeStyle typeFormat) [0x00191] in
/mnt/data/opt/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/MessageFormatter.cs:237
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize
(System.IO.Stream serializationStream, System.Object graph,
System.Runtime.Remoting.Messaging.Header[] headers) [0x00061] in
/mnt/data/opt/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.cs:226
I know that this may sound to a specific opencv or image question, but I
only want to know how can I traslate picture information with remoting,
I also know that may be this is not recomended due the large amount of
binary info..but I only need this for test porpuses, so bitmap, mpeg,
jpg, other streaming approach??.
in advance, thank you very much.
Mauricio
More information about the Mono-devel-list
mailing list