You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenJpegDotNet is perfect in x64 but it's has a problem in x86.
I used your library to encode bitmap file to jpeg2000. However, the following problem occurred in x86.
var buffer = new Buffer
{
Data = outputBuffer,
Length = bufferLength,
Position = 0
};
Data has address, length has imageSize + 1024, Position is zero.
After setting StreamCreate, StreamSetUpdateData, SteamSetUserDataLength and CallBack. I start to encode.
But the following problem occurred in StreamWriteCallBack()
var buf = (Buffer*)userData;
buf->Data has address, buf->Length is zero and buf->position is imageSize + 1024.
I'm wondering why is change Length and Position?
Always buf->Length is zero condition, so it's return unchecked((ulong)-1);
I think maybe the OpenJpegDotNetNative.dll of 32bit and 64bit is different. What do you think?
The text was updated successfully, but these errors were encountered:
@cargfiloy
In C#, IntPtr.Size is different size between x86 and x64.
Therefore, imageSize + 1024 may occur overlflow.
OpenJpegDotNetNative.dll of 32bit and 64bit is different. What do you think?
Source code is absolutely same and build command is almost same but it should not affect to it.
@cargfiloy In C#, IntPtr.Size is different size between x86 and x64. Therefore, imageSize + 1024 may occur overlflow.
OpenJpegDotNetNative.dll of 32bit and 64bit is different. What do you think?
Source code is absolutely same and build command is almost same but it should not affect to it.
@takuya-takeuchi
Yes, I know that. IntPtr.Size is 4(x86) or 8(x64).
I mean that Length and Position values are interchanged in StreamWriteCallBack()
For example, at the first call StreamWriteCallBack()
In x64,
In x86
OpenJpegDotNet is perfect in x64 but it's has a problem in x86.
I used your library to encode bitmap file to jpeg2000. However, the following problem occurred in x86.
var buffer = new Buffer
{
Data = outputBuffer,
Length = bufferLength,
Position = 0
};
Data has address, length has imageSize + 1024, Position is zero.
After setting StreamCreate, StreamSetUpdateData, SteamSetUserDataLength and CallBack. I start to encode.
But the following problem occurred in StreamWriteCallBack()
var buf = (Buffer*)userData;
buf->Data has address, buf->Length is zero and buf->position is imageSize + 1024.
I'm wondering why is change Length and Position?
Always buf->Length is zero condition, so it's return unchecked((ulong)-1);
I think maybe the OpenJpegDotNetNative.dll of 32bit and 64bit is different. What do you think?
The text was updated successfully, but these errors were encountered: