Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要裁剪一个非常大(10mb)的全屏背景位图,有时我无法为它分配另一个位图。
我想知道是否有一种方法可以自己裁剪位图,而无需在此过程中创建另一个位图。
Bitmap cropped = Bitmap.createBitmap(sourceBitmap, x, y, w, h)
这个功能很完美,但问题是,它分配了内存。
我只需要裁剪 25% 的高度。