scrolling repeating jpg

Posts: 306
Joined: 2009.03
Post: #1
Has anyone had much luck with this? I get it to work fine with png, and there was 2 occassions on the same image I am working now where it scrolled without a seam, but now I cannot reproduce that. Im guessing its a compression artificat. I have an extra column of pixels on each side the duplicate the last pixel which is how I get pngs to scroll nicely. Anyone have any tricks? I am thinking just saving over and over at various compression levels until you get that magic one where the pixels line up nicely.. strange.
Quote this message in a reply
Posts: 1,487
Joined: 2002.09
Post: #2
IIRC JPEG images are compressed as 8x8 blocks of pixels with no data shared between blocks. If you want to avoid seams, your image's width and height will have to be a multiple of 8. Then the only seam you should see would be the same as a normal artifact.

It might compress color data at a lower resolution than the luminance though (MPEG does), I can't really remember off the top of my head.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Post Reply