Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Binding Java Library problems with array and list

$
0
0

I have a problem regarding arrays and the binding.

I have this method in the java code:
public int generateDisplayImage(byte[] image, int inWidth, int inHeight, byte[] outImage, int outWidth, int outHeight, byte bkColor, int outFormat, int outQualityLevel, boolean outVerticalFlip) throws IBScanException {

It became
public virtual unsafe int GenerateDisplayImage (byte[] p0, int p1, int p2, byte[] p3, int p4, int p5, sbyte p6, int p7, int p8, bool p9)

However I have a class in java
public static class ImageData {
public final byte[] buffer;
protected ImageData(byte[] buffer, int width, int height, double resolutionX, double resolutionY, double frameTime, int pitch, short bitsPerPixel, int formatCode, boolean isFinal, int processThres) {
(...)

it became
[Register ("buffer")]
public IList Buffer {
get {
(...)

So this is a really big problem, I need to generate the image that is in the buffer but it si currently requiring me to do a .ToArray() operation which takes several seconds. It should be instantaneous.

I have tried to use the metadata.xml, for example:

"byte[]"

But I cannot have it be what I want. Instead of Byte[] it becomes a list.

Anyone can help? It is a bit urgent.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



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