Closed okrt-p07 closed 3 years ago
Ah, the parameters of https://github.com/JosePineiro/WebP-wrapper/blob/bc6f3a9133fae827ceea204fb97437b85b563fa4/WebPTest/WebPWrapper.cs#L1161 https://github.com/JosePineiro/WebP-wrapper/blob/bc6f3a9133fae827ceea204fb97437b85b563fa4/WebPTest/WebPWrapper.cs#L1185 must be (IntPtr data, UIntPtr data_size, IntPtr output_buffer, UIntPtr output_buffer_size, int output_stride) for Windows x64, isn't it?
On Windows x64, int and size_t are different size.
What you say is correct. I have corrected the bug
https://github.com/JosePineiro/WebP-wrapper/blob/bc6f3a9133fae827ceea204fb97437b85b563fa4/WebPTest/WebPWrapper.cs#L1160 https://github.com/JosePineiro/WebP-wrapper/blob/bc6f3a9133fae827ceea204fb97437b85b563fa4/WebPTest/WebPWrapper.cs#L1184
I think the following: https://github.com/JosePineiro/WebP-wrapper/blob/bc6f3a9133fae827ceea204fb97437b85b563fa4/WebPTest/WebPWrapper.cs#L1161 must be
public static IntPtr WebPDecodeBGRInto(IntPtr data, int data_size, IntPtr output_buffer, int output_buffer_size, int output_stride)
and https://github.com/JosePineiro/WebP-wrapper/blob/bc6f3a9133fae827ceea204fb97437b85b563fa4/WebPTest/WebPWrapper.cs#L1185 must bepublic static IntPtr WebPDecodeBGRAInto(IntPtr data, int data_size, IntPtr output_buffer, int output_buffer_size, int output_stride)
Some other lines related to this also need to be changed.
On Windows x86, int and IntPtr are same size. But on Windows x64, they are different size.