lossy-compression

Can a JPEG compressed image be rotated without a loss in quality?

泄露秘密 提交于 2019-11-30 03:03:32
JPEG is a lossy compression scheme, so decompression-manipulation-recompression normally reduces the image quality further for each step. Is it possible to rotate a JPEG image without incurring further loss? From what little I know of the JPEG algorithm, it naively seems possible to avoid further loss with a bit of effort. Which common image manipulation programs (e.g. GIMP, Paint Shop Pro, Windows Photo Gallery) and graphic libraries cause quality loss when performing a rotation and which don't? Boojum Yes, it is possible for certain cases: 90-degree rotations and flips on images. The heart

Is there a quality, file-size, or other benefit to JPEG sizes being multiples of 8px or 16px?

扶醉桌前 提交于 2019-11-29 06:55:41
The JPEG compression encoding process splits a given image into blocks of 8x8 pixels, working with these blocks in future lossy and lossless compressions. [source] It is also mentioned that if the image is a multiple 1MCU block (defined as a Minimum Coded Unit, 'usually 16 pixels in both directions') that lossless alterations to a JPEG can be performed. [source] I am working with product images and would like to know both if, and how much benefit can be derived from using multiples of 16 in my final image size (say, using an image with size 480px by 360px) vs. a non-multiple of 16 (such as

Can a JPEG compressed image be rotated without a loss in quality?

时光毁灭记忆、已成空白 提交于 2019-11-29 00:09:16
问题 JPEG is a lossy compression scheme, so decompression-manipulation-recompression normally reduces the image quality further for each step. Is it possible to rotate a JPEG image without incurring further loss? From what little I know of the JPEG algorithm, it naively seems possible to avoid further loss with a bit of effort. Which common image manipulation programs (e.g. GIMP, Paint Shop Pro, Windows Photo Gallery) and graphic libraries cause quality loss when performing a rotation and which

Is there a quality, file-size, or other benefit to JPEG sizes being multiples of 8px or 16px?

江枫思渺然 提交于 2019-11-28 00:17:21
问题 The JPEG compression encoding process splits a given image into blocks of 8x8 pixels, working with these blocks in future lossy and lossless compressions. [source] It is also mentioned that if the image is a multiple 1MCU block (defined as a Minimum Coded Unit, 'usually 16 pixels in both directions') that lossless alterations to a JPEG can be performed. [source] I am working with product images and would like to know both if, and how much benefit can be derived from using multiples of 16 in

Reducing video size with same format and reducing frame size

白昼怎懂夜的黑 提交于 2019-11-27 17:04:41
This question might be very basic Is there a way to reduce the frame size/rate of Lossy compressed (WMV, MPEG) format, to get a smaller video, of lesser size, with same format. Are there any open source or proprietary apis for this? Jason B ffmpeg provides this functionality. All you need to do is run someting like ffmpeg -i <inputfilename> -s 640x480 -b 512k -vcodec mpeg1video -acodec copy <outputfilename> For newer versions of ffmpeg you need to change -b to -b:v : ffmpeg -i <inputfilename> -s 640x480 -b:v 512k -vcodec mpeg1video -acodec copy <outputfilename> to convert the input video file

How to save a JPEG image on Android with a custom quality level

爱⌒轻易说出口 提交于 2019-11-27 08:08:34
On Android, how do I save an image file as a JPEG at 30% quality? In standard Java, I would use ImageIO to read the image as a BufferedImage , then save it as a JPEG file using an IIOImage instance: http://www.universalwebservices.net/web-programming-resources/java/adjust-jpeg-image-compression-quality-when-saving-images-in-java . It appears, however, that Android lacks the javax.imageio package. Phyrum Tea You can store your bitmap in the JPEG format by calling compress and setting the second parameter: Bitmap bm2 = createBitmap(); OutputStream stream = new FileOutputStream("/sdcard/test.jpg"

Reducing video size with same format and reducing frame size

孤人 提交于 2019-11-26 18:48:54
问题 This question might be very basic Is there a way to reduce the frame size/rate of Lossy compressed (WMV, MPEG) format, to get a smaller video, of lesser size, with same format. Are there any open source or proprietary apis for this? 回答1: ffmpeg provides this functionality. All you need to do is run someting like ffmpeg -i <inputfilename> -s 640x480 -b 512k -vcodec mpeg1video -acodec copy <outputfilename> For newer versions of ffmpeg you need to change -b to -b:v : ffmpeg -i <inputfilename> -s

How to save a JPEG image on Android with a custom quality level

回眸只為那壹抹淺笑 提交于 2019-11-26 14:01:51
问题 On Android, how do I save an image file as a JPEG at 30% quality? In standard Java, I would use ImageIO to read the image as a BufferedImage , then save it as a JPEG file using an IIOImage instance: http://www.universalwebservices.net/web-programming-resources/java/adjust-jpeg-image-compression-quality-when-saving-images-in-java. It appears, however, that Android lacks the javax.imageio package. 回答1: You can store your bitmap in the JPEG format by calling compress and setting the second