All Projects → nanchen2251 → Compresshelper

nanchen2251 / Compresshelper

🔥 压缩文件,压缩图片,压缩Bitmap,Compress, CompressImage, CompressFile, CompressBitmap:https://github.com/nanchen2251/AiYaCompressHelper

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Compresshelper

Localresizeimg
🔥 前端本地客户端压缩图片,兼容IOS,Android,PC、自动按需加载文件
Stars: ✭ 3,135 (+32.73%)
Mutual labels:  image, compressimage
Compress.js
A simple JavaScript based client-side image compression algorithm
Stars: ✭ 86 (-96.36%)
Mutual labels:  image, compress
File Upload With Preview
🖼 A simple file-upload utility that shows a preview of the uploaded image. Written in pure JavaScript. No dependencies. Works well with Bootstrap 4 or without a framework.
Stars: ✭ 352 (-85.1%)
Mutual labels:  image, file
Tableexport
tableExport(table导出文件,支持json、csv、txt、xml、word、excel、image、pdf)
Stars: ✭ 261 (-88.95%)
Mutual labels:  image, file
React Files
A file input (dropzone) management component for React
Stars: ✭ 126 (-94.67%)
Mutual labels:  image, file
Eager Image Loader
The eager-loading for image files on the web page that loads the files according to your plan. This differs from the lazy-loading, for example, this can be used to avoid that the user waits for the loading.
Stars: ✭ 22 (-99.07%)
Mutual labels:  image, file
Mybox
Easy tools of document, image, file, network, location, color, and media.
Stars: ✭ 45 (-98.09%)
Mutual labels:  image, compress
Angular File Uploader
Angular file uploader is an Angular 2/4/5/6/7/8/9/10 + file uploader module with Real-Time Progress Bar, Responsive design, Angular Universal Compatibility, localization and multiple themes which includes Drag and Drop and much more.
Stars: ✭ 92 (-96.1%)
Mutual labels:  image, file
React Image File Resizer
Resize Local Images with React 🌄 🌅
Stars: ✭ 108 (-95.43%)
Mutual labels:  image, file
File Icon
Get the icon of a file or app as a PNG image (macOS)
Stars: ✭ 100 (-95.77%)
Mutual labels:  image, file
Isobmff
C++ Library for ISO/IEC 14496-12 - ISO Base Media File Format (QuickTime, MPEG-4, HEIF, etc)
Stars: ✭ 157 (-93.35%)
Mutual labels:  image, file
Hrconvert2
A self-hosted, drag-and-drop, & nosql file conversion server that supports 62x file formats.
Stars: ✭ 132 (-94.41%)
Mutual labels:  image, file
Uploadcare Widget
Uploadcare Widget, an ultimate tool for HTML5 file upload supporting multiple file upload, drag&drop, validation by file size/file extension/MIME file type, progress bar for file uploads, image preview.
Stars: ✭ 183 (-92.25%)
Mutual labels:  image, file
Downloader
Powerful and flexible Android file downloader
Stars: ✭ 193 (-91.83%)
Mutual labels:  file
Laosj
golang light-weight image crawler
Stars: ✭ 199 (-91.57%)
Mutual labels:  image
Ngx Material File Input
File input for Angular Material form-field
Stars: ✭ 193 (-91.83%)
Mutual labels:  file
Croppie
A Javascript Image Cropper
Stars: ✭ 2,330 (-1.35%)
Mutual labels:  image
Jekyll Spaceship
🚀 A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.
Stars: ✭ 196 (-91.7%)
Mutual labels:  image
Silentbox
A lightbox inspired Vue.js component.
Stars: ✭ 196 (-91.7%)
Mutual labels:  image
Video Thumbnail Generator
📷 Generate thumbnail sprites from videos.
Stars: ✭ 190 (-91.96%)
Mutual labels:  image

AiYaCompressHelper

压缩,图片压缩,压缩Bitmap,Compress,CompressImage,CompressFile,CompressBitmap

主要通过尺寸压缩和质量压缩,以达到清晰度最优,该项目参考了 https://github.com/zetbaitsu/Compressor 的部分代码,且在基础上修正了部分 bug

效果图

⊙开源不易,希望给个 star 或者 fork 奖励

⊙拥抱开源:https://github.com/nanchen2251/

⊙交流群(拒绝无脑问):118116509 Android神技侧漏交流群( 点击图标即可加入 )

特点

1、支持压缩单张图片和多张图片

使用方法

1、添加依赖

Step 1. Add it in your root build.gradle at the end of repositories:
allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}
Step 2. Add the dependency
dependencies {
	        implementation 'com.github.nanchen2251:CompressHelper:1.0.5'
	}

2、在Activity里面使用

   File newFile = CompressHelper.getDefault(this).compressToFile(oldFile);

3、你也可以自定义属性

   File newFile = new CompressHelper.Builder(this)
                    .setMaxWidth(720)  // 默认最大宽度为720
                    .setMaxHeight(960) // 默认最大高度为960
                    .setQuality(80)    // 默认压缩质量为80
		    .setFileName(yourFileName) // 设置你需要修改的文件名
                    .setCompressFormat(CompressFormat.JPEG) // 设置默认压缩为jpg格式
                    .setDestinationDirectoryPath(Environment.getExternalStoragePublicDirectory(
                            Environment.DIRECTORY_PICTURES).getAbsolutePath())
                    .build()
                    .compressToFile(oldFile);

该项目参考了:

关于作者

   南尘
   四川成都
   其它开源
   个人博客
   简书
   博客园
   交流群:118116509
   欢迎投稿(关注)我的唯一公众号,公众号搜索 nanchen 或者扫描下方二维码:
   

有码走遍天下 无码寸步难行(引自网络)

1024 - 梦想,永不止步!
爱编程 不爱Bug
爱加班 不爱黑眼圈
固执 但不偏执
疯狂 但不疯癫
生活里的菜鸟
工作中的大神
身怀宝藏,一心憧憬星辰大海
追求极致,目标始于高山之巅
一群怀揣好奇,梦想改变世界的孩子
一群追日逐浪,正在改变世界的极客
你们用最美的语言,诠释着科技的力量
你们用极速的创新,引领着时代的变迁

------至所有正在努力奋斗的程序猿们!加油!!

Licenses

 Copyright 2017 nanchen(刘世麟)

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].