image-compression

Android: Compressing images creates black borders on left and top margin

自作多情 提交于 2019-12-06 15:44:53
I'm using this compression class from the following site: http://voidcanvas.com/whatsapp-like-image-compression-in-android/ Here is my compression class with very little modifications from the original class: import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; import android.media.ExifInterface; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import timber.log.Timber; //http://voidcanvas.com/whatsapp

How to convert my photos to webp format of Google in windows 8.1?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 05:10:28
问题 I want to convert my photos from jpg, gif and png to WebP format! When I'm trying to use CMD for using cwebp command, I got this error message : 'cwebp' is not recognized as an internal or external command, operable program or batch file. What should do I do ? I've downloaded all the files needed such as libwebp-0.4.0-windows-x86.zip and WebpCodecSetup.exe (from this url : "https://code.google.com/p/webp/downloads/list"). even I've installed Visual Studio to use its command prompt, but didn't

Tool for lossless image compression [closed]

妖精的绣舞 提交于 2019-12-06 03:14:42
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . Running Google Page Speed on a public site , I saw some suggestions by the tool like the following : Losslessly compressing http://g-ecx.images-amazon.com/images/G/01/electronics/detail-page/Acer-120x120._V137848950_.gi could save 4.8KiB (26% reduction) and they also provide a link to the optimized content.But

Optimize images - Losslessly compress images in Java

為{幸葍}努か 提交于 2019-12-06 00:49:22
Having an ecommerce website, We have thousands of product images. On checking pagespeed on google it shows me something like this: I was wondering, if there is any built in feature in Java or any third party library is available with which we can losslessly compress all the images that we host. Hence we can save few KBs of our customers. On searching through internet I found few like punnypng and kraken which are paid, hence we do not have heavy image uploaded every month, subscribing to them is not worth. I would prefer any built in feature in Java or any open source third party library. I

How to rotate a JPEG file on Android without losing quality and gaining file size?

老子叫甜甜 提交于 2019-12-05 09:45:04
Background I need to rotate images taken by the camera so that they will always have a normal orientation. for this, I use the next code (used this post to get the image orientation) //<= get the angle of the image , and decode the image from the file final Matrix matrix = new Matrix(); //<= prepare the matrix based on the EXIF data (based on https://gist.github.com/9re/1990019 ) final Bitmap rotatedBitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(),matrix,false); bitmap.recycle(); fileOutputStream = new FileOutputStream(tempFilePath); rotatedBitmap.compress

Compressing an Image before Uploading it to Firebase Storage

若如初见. 提交于 2019-12-04 14:24:41
问题 I am trying to Compress an Image before Uploading it to Firebase Storage using SiliCompressor library , but it seems not working , the ProgressDialog doesn't stop. What i first did was to pick the Image from the Gallery into an ImageButton by clicking an ImageButton. Below is my code. imageSelect.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent galleryIntent = new Intent(Intent.ACTION_GET_CONTENT); galleryIntent.setType("image/");

How to convert my photos to webp format of Google in windows 8.1?

爱⌒轻易说出口 提交于 2019-12-04 10:08:52
I want to convert my photos from jpg, gif and png to WebP format! When I'm trying to use CMD for using cwebp command, I got this error message : 'cwebp' is not recognized as an internal or external command, operable program or batch file. What should do I do ? I've downloaded all the files needed such as libwebp-0.4.0-windows-x86.zip and WebpCodecSetup.exe (from this url : " https://code.google.com/p/webp/downloads/list "). even I've installed Visual Studio to use its command prompt, but didn't work !!! Is there anyone can help me ?? One more questation: Is anyone know any tool to reduce image

Tool for lossless image compression [closed]

我的梦境 提交于 2019-12-04 07:20:51
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . Running Google Page Speed on a public site , I saw some suggestions by the tool like the following : Losslessly compressing http://g-ecx.images-amazon.com/images/G/01/electronics/detail-page/Acer-120x120._V137848950_.gi could save 4.8KiB (26% reduction) and they also provide a link to the optimized content.But they do it on a per image basis. I saw some significant reduction on file sizes after

why DCT transform is preferred over other transforms in video/image compression

谁说胖子不能爱 提交于 2019-12-04 01:12:37
I went through how DCT (discrete cosine transform) is used in image and video compression standards. But why DCT only is preferred over other transforms like dft or dst? Because cos(0) is 1, the first (0th) coefficient of DCT-II is the mean of the values being transformed. This makes the first coefficient of each 8x8 block represent the average tone of its constituent pixels, which is obviously a good start. Subsequent coefficients add increasing levels of detail, starting with sweeping gradients and continuing into increasingly fiddly patterns, and it just so happens that the first few

Code Golf: 1x1 black pixel

感情迁移 提交于 2019-12-03 06:36:41
问题 Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. Recently, I used my favorite image editor to make a 1x1 black pixel (which can come in handy when you want to draw solid boxes in HTML cheaply). Even though I made it a monochrome PNG, it came out to be 120 bytes! I mean, that's kind of steep. 120 bytes. For one pixel . I then converted it to a GIF, which dropped the