Domanda

To gain on speed, in an application, I've tried to fill each horizontal odd line of pixels with the pixels from the previous even horizontal line. The problem is that I thought I'd save a bit on space, but for 20% of speed gain, the size of my stack of jpegs has almost doubled.

I'm now thinking about just skipping the image processing on odd line, instead of copying the previous pixels on odd line, since there's no gain on file size.

Am I preventing the jpeg codec from compressing the image when I do this?

È stato utile?

Soluzione

DCT, which is used in JPEG compression algorithm won't be too effective on sharp details you are artificially creating.

If you want to save on space reducing vertical resolution, don't just copy lines, scale it down be 2 on vertical axis and scale up by 2 when displaying.

But it WILL look ugly.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top