rich-edit-text's People
Forkers
standopen zhangrui49 alexanderinhust turbsky runly greamforzxp scauyjj yuxin93 swinner buptlinyuan taiyangniao2014 mengzhinan tangyiyongrich-edit-text's Issues
首先向大神致敬,这么好的开源项目。我在使用时发现一个小问题,就是小图片会被拉伸,于是我改了下面这个函数
public static Bitmap decodeScaleImage(String path, int maxWidth, int maxHeight) {
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = false;
Bitmap bitmap = BitmapFactory.decodeFile(path, options);
if (options.outWidth <= 0 || options.outHeight <= 0) {
// 保护策略,防止下面出现崩溃
return bitmap;
}
// 如果原图片尺寸大于预设的最大尺寸,则进行压缩
if (options.outWidth > maxWidth || options.outHeight > maxHeight) {
Bitmap decodeBitmap = createScaledBitmap(bitmap, options.outWidth, options.outHeight
, maxWidth, maxHeight);
int degree = readPictureDegree(path);
if (decodeBitmap != null && degree != 0) {
bitmap = rotateBitmap(degree, decodeBitmap);
decodeBitmap.recycle();
return bitmap;
} else {
return decodeBitmap;
}
} else {
return bitmap;
}
}
大神,项目还在写吗?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.