createBitmap — java.lang.IllegalArgumentException: x must be < bitmap.width()错误的解决
2016-10-15 20:24
731 查看
No, not
You are creating a
so:
Basically, you are drawing from
d714
is only 480x320. Obviously, this is not possible, since your
is off the
It's hard to tell you how to fix this without knowing your exact use case. Basically, your
has to fit within
原文
x must be < bitmap.width(). It says
x + width must be <= bitmap.width().
You are creating a
Bitmaplike
so:
Bitmap.createBitmap(source, 60, 0, 480, 260); // 320 - 60 = 260
Basically, you are drawing from
x = 60, y = 0to
x = 480 + 60, y = 260on a
Bitmapwhich
d714
is only 480x320. Obviously, this is not possible, since your
xcoordinate
is off the
Bitmap.
It's hard to tell you how to fix this without knowing your exact use case. Basically, your
sourceimage
has to fit within
{ x1: x, x2: x + width, y1: y, y2: y + height }.
原文
相关文章推荐
- Bitmap.createBitmap参数异常之java.lang.IllegalArgumentException: width and height must be > 0
- java.lang.IllegalArgumentException: x + width must be <= bitmap.width()问题
- Bitmap.createBitmap java.lang.IllegalArgumentException: width and height must be > 0 问题解决
- Bitmap.createBitmap java.lang.IllegalArgumentException: width and height must be > 0 问题解决
- java.lang.IllegalArgumentException: FacesContext must not be null 错误分析及解决
- bitmap 缩放 java.lang.IllegalArgumentException: width and height must be > 0
- android L java.lang.IllegalArgumentException: Service Intent must be explicit隐式意图找不到错误解决
- java.lang.IllegalArgumentException: width and height must be > 0
- java.lang.IllegalArgumentException: Service Intent must be explicit解决方法
- java.lang.IllegalArgumentException: Service Intent must be explicit解决方法
- 使用android OpenGL时出现的java.lang.IllegalArgumentException: Must use a native order direct Buffer错误问题解决
- java.lang.IllegalArgumentException: Service Intent must be explicit 异常解决
- JMeter学习-027-JMeter参数文件(脚本分发)路径问题:jmeter.threads.JMeterThread: Test failed! java.lang.IllegalArgumentException: File distributed.csv must exist and be readable解决方法
- 错误 java.lang.IllegalArgumentException: parameter must be a descendant of this view 的解决方案
- 解决 java.lang.IllegalArgumentException: Repository interface must not be null on initialization!
- Fragment中测量宽度、高度, Caused by: java.lang.IllegalArgumentException: width and height must be > 0
- 错误 java.lang.IllegalArgumentException: parameter must be a descendant of this view 的解决方案
- java.lang.IllegalArgumentException: Width (0) and height (560) cannot be <= 0
- 解决Android5.0及以上启动Service时,java.lang.IllegalArgumentException: Service Intent must be explicit
- java.lang.IllegalArgumentException: sessionFactory or hibernateTemplate is required 错误解决方法