com.bumptech.glide.util.Util.getBytesPerPixel()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(1.1k)|赞(0)|评价(0)|浏览(114)

本文整理了Java中com.bumptech.glide.util.Util.getBytesPerPixel()方法的一些代码示例,展示了Util.getBytesPerPixel()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.getBytesPerPixel()方法的具体详情如下:
包路径:com.bumptech.glide.util.Util
类名称:Util
方法名:getBytesPerPixel

Util.getBytesPerPixel介绍

暂无

代码示例

代码示例来源:origin: bumptech/glide

/**
 * Returns the in memory size of {@link android.graphics.Bitmap} with the given width, height, and
 * {@link android.graphics.Bitmap.Config}.
 */
public static int getBitmapByteSize(int width, int height, @Nullable Bitmap.Config config) {
 return width * height * getBytesPerPixel(config);
}

代码示例来源:origin: guolindev/giffun

/**
 * Returns the in memory size of {@link Bitmap} with the given width, height, and
 * {@link Bitmap.Config}.
 */
public static int getBitmapByteSize(int width, int height, Bitmap.Config config) {
  return width * height * getBytesPerPixel(config);
}

代码示例来源:origin: mozilla-tw/Rocket

/**
 * Returns the in memory size of {@link android.graphics.Bitmap} with the given width, height, and
 * {@link android.graphics.Bitmap.Config}.
 */
public static int getBitmapByteSize(int width, int height, Bitmap.Config config) {
 return width * height * getBytesPerPixel(config);
}

相关文章