jpeg

Preserving image type info in PIL when cropping

北城余情 提交于 2021-02-08 03:31:00
问题 I am using the excellent modification to Python's PIL by Etienne from here. What I need is exactly what the modification does - to save a JPEG file using the same quantization tables as the original. Doing it through that modification seems elegant, I'm currently achieving that by using a hodgepodge of C code. My problem is that I get a JPEG file object in PIL, but after any modification it becomes an object of some other type. What I want is to take the image, crop it and save it with the

Why Google recommends using JPEG 2000 and JPEG XR and after Google Chrome doesn't support them?

自闭症网瘾萝莉.ら 提交于 2021-02-07 20:28:11
问题 Google recommends "Serve Images in Next-Gen Formats" and specifically mentions WebP, JPEG 2000 and JPEG XR, but then it doesn't provide support for 2 of them (JPEG 2000 and JPEG XR) in its own browser . Can someone please explain me why is this? 回答1: This is because there is support for those formats in other browsers not just Google Chrome. If all the users on the internet visited your website with Google Chrome then those formats would be insignificant to mention. Here is a free tool that

RGB buffer to JPEG buffer, what is wrong here?

[亡魂溺海] 提交于 2021-02-07 19:23:43
问题 I need an easy way to convert an buffer containing RGB data into a jpeg. I already tried using libjpeg, but I simply cannot get it to work right. For example, while saving the buffer as a Bitmap produces this: Using libjpeg to encode the same image in memory produces this: And saving the image directly to a file just aborts without giving a warning, error or anything. I certainly need something that works! This is what I am doing void OnKeyPress(unsigned char key, int x, int y) { if (key !=

RGB buffer to JPEG buffer, what is wrong here?

我们两清 提交于 2021-02-07 19:23:22
问题 I need an easy way to convert an buffer containing RGB data into a jpeg. I already tried using libjpeg, but I simply cannot get it to work right. For example, while saving the buffer as a Bitmap produces this: Using libjpeg to encode the same image in memory produces this: And saving the image directly to a file just aborts without giving a warning, error or anything. I certainly need something that works! This is what I am doing void OnKeyPress(unsigned char key, int x, int y) { if (key !=

Android stream multiple bitmap tiles to single jpeg file

一世执手 提交于 2021-02-07 09:12:48
问题 I am developing an image manipulation application which has to be able to work on large images e.g. those taken by a camera, the approach I'm taking is to split the source image into multiple suitably sized tiles so that the tiles can be loaded individually into memory as a Bitmap without exceeding the dreaded VM limit, next image manipulation is performed on a tile by tile basis, this is all well and good but until I want to stitch these tiles back to a final jpeg image. I'm looking for a

Reading a progressively encoded 9000x9000 JPEG in Java takes 1 minute

帅比萌擦擦* 提交于 2021-02-06 19:21:09
问题 When using javax.imageio.ImageIO to load a large-resolution (9000x9000) JPEG from disk, it takes more than 1 minute in my scala application. I tried creating a Java-only project, but it still takes too long - around 30 seconds. This is how I load the image: File file = new File("/Users/the21st/slow2.jpg"); BufferedImage image = ImageIO.read(file); Is there any way to improve performance on reading progressively encoded large-res JPEGs in Java? The image in question is this one (moderators,

Reading a progressively encoded 9000x9000 JPEG in Java takes 1 minute

孤街醉人 提交于 2021-02-06 19:16:22
问题 When using javax.imageio.ImageIO to load a large-resolution (9000x9000) JPEG from disk, it takes more than 1 minute in my scala application. I tried creating a Java-only project, but it still takes too long - around 30 seconds. This is how I load the image: File file = new File("/Users/the21st/slow2.jpg"); BufferedImage image = ImageIO.read(file); Is there any way to improve performance on reading progressively encoded large-res JPEGs in Java? The image in question is this one (moderators,

Reading a progressively encoded 9000x9000 JPEG in Java takes 1 minute

牧云@^-^@ 提交于 2021-02-06 19:16:18
问题 When using javax.imageio.ImageIO to load a large-resolution (9000x9000) JPEG from disk, it takes more than 1 minute in my scala application. I tried creating a Java-only project, but it still takes too long - around 30 seconds. This is how I load the image: File file = new File("/Users/the21st/slow2.jpg"); BufferedImage image = ImageIO.read(file); Is there any way to improve performance on reading progressively encoded large-res JPEGs in Java? The image in question is this one (moderators,

Reading a progressively encoded 9000x9000 JPEG in Java takes 1 minute

我怕爱的太早我们不能终老 提交于 2021-02-06 19:15:52
问题 When using javax.imageio.ImageIO to load a large-resolution (9000x9000) JPEG from disk, it takes more than 1 minute in my scala application. I tried creating a Java-only project, but it still takes too long - around 30 seconds. This is how I load the image: File file = new File("/Users/the21st/slow2.jpg"); BufferedImage image = ImageIO.read(file); Is there any way to improve performance on reading progressively encoded large-res JPEGs in Java? The image in question is this one (moderators,

Reading a progressively encoded 9000x9000 JPEG in Java takes 1 minute

孤者浪人 提交于 2021-02-06 19:14:22
问题 When using javax.imageio.ImageIO to load a large-resolution (9000x9000) JPEG from disk, it takes more than 1 minute in my scala application. I tried creating a Java-only project, but it still takes too long - around 30 seconds. This is how I load the image: File file = new File("/Users/the21st/slow2.jpg"); BufferedImage image = ImageIO.read(file); Is there any way to improve performance on reading progressively encoded large-res JPEGs in Java? The image in question is this one (moderators,