bug1

1从相册中获取图片,低版本可以,高版本不行.看见抛出

Bitmap too large to be uploaded into a texture

原来是高版本的android,机子好点,相机就好点,照片就大点...

压缩图片加载,参看下面:

http://www.stormzhang.com/android/2013/11/20/android-display-bitmaps-efficiently/

2java 的byte范围-128~127,c/c++ byte范围是[0,255]

C++的字节顺序是从低到高(左低到右高),

而java的写入顺序是左高右低(high byte first)

void java.io.DataOutputStream.writeInt(int v) throws IOException

Writes an int to the underlying output stream as four bytes, high byte first. If no exception is thrown, the counter written is incremented by 4.

(ps:将3d保存为stl文件时,遇到的坑)

3

<<      :     左移运算符,num << 1,相当于num乘以2

>>      :     右移运算符,num >> 1,相当于num除以2

>>>    :     无符号右移,忽略符号位,空位都以0补齐

因此低字节数组转java int时使用<<左移后要&补位

给笨笨的自己提个醒>_<~
原文地址:https://www.cnblogs.com/ephuizi/p/4723591.html