`
samyou
  • 浏览: 106250 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

bimap压缩

阅读更多
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;
        }
		
	}

分享到:
评论

相关推荐

    bimap:一个强大、灵活、高效的 JavaScript 双向地图实现

    var bimap = new BiMap bimap . push ( "key" , "value" ) ; bimap . key ( "key" ) ; // => "value" bimap . val ( "value" ) ; // => "key" bimap . push ( "France" , [ "Paris" , "Lyon" , "Marseille" ] ) ; ...

    bimap-一种快速的双向双射图实现-Rust开发

    bimap-rs bimap-rs是Rust的双向双向射影地图实现。 用法安装要在您的Rust项目中使用bimap-rs,请将以下内容添加到bimap-rs中:bimap-rs是Rust的双向双向图实现。 用法安装要在您的Rust项目中使用bimap-rs,请将以下...

    THE BOOST C++ LIBRARIES

    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中的通用双射图

    bimap-rs:Rust中的通用双射图

    elixir-bimap:双向地图和多地图的Elixir实现

    elixir-bimap:双向地图和多地图的Elixir实现

    BI数据架构

    《大数据架构详解:从数据获取到深度学习》从架构、业务、技术三个维度深入浅出地介绍了大数据处理领域端到端的知识。主要内容包括三部分:第一部分从数据的产生、采集、计算、存储、消费端到端的角度介绍大数据技术...

    Bitmap,byte[],Drawable相互转化

    1、Drawable就是一个可画的对象,其可能是一张位图(BitmapDrawable),也可能是一个图形(ShapeDrawable),还有可能是一个图层(LayerDrawable),我们根据画图的需求,创建相应的可画对象2、Canvas画布,绘图的...

    Vb3.rar_读文件

    读256色bimap格式文件,具有放大,缩小,平移,旋转等功能

    BiMaps.jl:双射映射

    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 ...

    google的collection包

    提供了强大的map功能,有说明文档,其中最具特色的是双向bimap功能,提供了key和value反转的功能。包含源码

    boost 1.41 中文文档,使用帮助,教程手册

    alai04 accumulators, any, assign, bimap, call_traits, circular_buffer, compatibility, concept check, config, conversion, date_time, filesystem, foreach, function_types, functional, integer, intrusive,...

    downloads.part1.rar

    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-...

    downloads.part3.rar

    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-...

    downloads.part2.rar

    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-...

    pratica::tumbler_glass:功能代数数据类型

    链.chainErr .bimap 。交换.cata .toMaybe 。检查.isErr .isOk 实用工具包住装箱正义好的得到头最后的尾巴tryFind parseDate 从V1更改为V2 如果要从Pratica V1迁移到V2。 以下是所做更改的一小部分: Maybe()实用...

    tlplib:一堆用于Unity3D游戏开发的实用程序

    BiMap。 Promise&Futures,协程助手。 各种数据结构。 Iter库-免费分配的枚举数。 一堆扩展方法。 JSON解析器/发射器。 功能实用程序:Option,Lazy,Tuple,Either,Try,Unit,协变函数和操作,基本模式匹配。 ...

    Map2 - 增强的地图类:Map2 增强了内置容器.Map 类的功能。-matlab开发

    也是双向使用支持键值对(如 Boost.Bimap 库)。 可以使用大括号 {range1,range2} 对 Map2 对象进行索引。 它返回 Map2 给定范围的值或标量值的元胞数组(范围1,范围2)。 range1 是指设置的值的位置和range2 指的...

    cpp-near-linear-function-space

    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用法演示

    演示如何使用qt的tab来管理多个页面,网上相关文章较多,参考了下,有些不同,欢迎小伙伴们随时拍砖

Global site tag (gtag.js) - Google Analytics