public static Bitmap bitmapRoom(Bitmap srcBitmap,int newWidth,int newHeight)
{
int srcWidth = srcBitmap.getWidth();
int srcHeight = srcBitmap.getHeight();
float scaleWidth = ((float) newWidth) / srcWidth;
float scaleHeight = ((float) newHeight) / srcHeight;
Matrix matrix = new Matrix();
matrix.postScale(scaleWidth, scaleHeight);
Bitmap resizedBitmap = Bitmap.createBitmap(srcBitmap, 0, 0, srcWidth,
srcHeight, matrix, true);
if(resizedBitmap != null)
{
return resizedBitmap;
}
else
{
return srcBitmap;
}
}
分享到:
相关推荐
var bimap = new BiMap bimap . push ( "key" , "value" ) ; bimap . key ( "key" ) ; // => "value" bimap . val ( "value" ) ; // => "key" bimap . push ( "France" , [ "Paris" , "Lyon" , "Marseille" ] ) ; ...
bimap-rs bimap-rs是Rust的双向双向射影地图实现。 用法安装要在您的Rust项目中使用bimap-rs,请将以下内容添加到bimap-rs中:bimap-rs是Rust的双向双向图实现。 用法安装要在您的Rust项目中使用bimap-rs,请将以下...
13.5 Boost.Bimap 13.6 Exercises Chapter 14: Data Structures 14.1 General 14.2 Boost.Tuple 14.3 Boost.Any 14.4 Boost.Variant 14.5 Exercises Chapter 15: Error Handling 15.1 General 15.2 Boost.System ...
bimap-rs:Rust中的通用双射图
elixir-bimap:双向地图和多地图的Elixir实现
《大数据架构详解:从数据获取到深度学习》从架构、业务、技术三个维度深入浅出地介绍了大数据处理领域端到端的知识。主要内容包括三部分:第一部分从数据的产生、采集、计算、存储、消费端到端的角度介绍大数据技术...
1、Drawable就是一个可画的对象,其可能是一张位图(BitmapDrawable),也可能是一个图形(ShapeDrawable),还有可能是一个图层(LayerDrawable),我们根据画图的需求,创建相应的可画对象2、Canvas画布,绘图的...
读256色bimap格式文件,具有放大,缩小,平移,旋转等功能
bimap = BiMap {Int,String} () bimap . left[ 1 ] = " one " bimap . left[ 2 ] = " two " bimap . right[ " three " ] = 3 @assert bimap . left[ 1 ] == " one " @assert bimap . right[ " two " ] == 2 @assert ...
提供了强大的map功能,有说明文档,其中最具特色的是双向bimap功能,提供了key和value反转的功能。包含源码
alai04 accumulators, any, assign, bimap, call_traits, circular_buffer, compatibility, concept check, config, conversion, date_time, filesystem, foreach, function_types, functional, integer, intrusive,...
atomic-boost-1.70.0.tar.gz boostorg-beast-boost-1.70.0.tar.gz boostorg-bimap-boost-1.70.0.tar.gz boostorg-bind-boost-1.70.0.tar.gz boostorg-build-boost-1.70.0.tar.gz boostorg-callable_traits-boost-...
atomic-boost-1.70.0.tar.gz boostorg-beast-boost-1.70.0.tar.gz boostorg-bimap-boost-1.70.0.tar.gz boostorg-bind-boost-1.70.0.tar.gz boostorg-build-boost-1.70.0.tar.gz boostorg-callable_traits-boost-...
atomic-boost-1.70.0.tar.gz boostorg-beast-boost-1.70.0.tar.gz boostorg-bimap-boost-1.70.0.tar.gz boostorg-bind-boost-1.70.0.tar.gz boostorg-build-boost-1.70.0.tar.gz boostorg-callable_traits-boost-...
链.chainErr .bimap 。交换.cata .toMaybe 。检查.isErr .isOk 实用工具包住装箱正义好的得到头最后的尾巴tryFind parseDate 从V1更改为V2 如果要从Pratica V1迁移到V2。 以下是所做更改的一小部分: Maybe()实用...
BiMap。 Promise&Futures,协程助手。 各种数据结构。 Iter库-免费分配的枚举数。 一堆扩展方法。 JSON解析器/发射器。 功能实用程序:Option,Lazy,Tuple,Either,Try,Unit,协变函数和操作,基本模式匹配。 ...
也是双向使用支持键值对(如 Boost.Bimap 库)。 可以使用大括号 {range1,range2} 对 Map2 对象进行索引。 它返回 Map2 给定范围的值或标量值的元胞数组(范围1,范围2)。 range1 是指设置的值的位置和range2 指的...
cpp-近线性函数空间一个C ++ 17库,用于围绕通用函数编程的模板/编译时高阶函数。...核心清单包括: repeat , map , fold , first , find all , zip (bimap),扣紧(bifold), glide (带提手的zip)。
建模任务 需要安装Haskell软件包(对于类/对象图部分): cabal install bytestring cabal install digest cabal install random-...cabal install bimap cabal install string-interpolate cabal install call-alloy
演示如何使用qt的tab来管理多个页面,网上相关文章较多,参考了下,有些不同,欢迎小伙伴们随时拍砖