AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2000.02.02 17:50 "Microsoft Imaging and Jpeg in TIFF", by Randall Myers
2000.02.02 21:35 "Re: Microsoft Imaging and Jpeg in TIFF", by Andy
2000.02.03 01:42 "Re: Microsoft Imaging and Jpeg in TIFF", by Joris Van Damme
2000.02.03 16:20 "Re: Microsoft Imaging and Jpeg in TIFF", by Andy
2000.02.03 16:24 "Re: Microsoft Imaging and Jpeg in TIFF", by Joris Van Damme
2000.02.05 20:46 "Re: Microsoft Imaging and Jpeg in TIFF", by Niles Ritter
2000.02.06 01:13 "Re: Microsoft Imaging and Jpeg in TIFF", by Joris Van Damme
2000.02.06 04:59 "Re: Microsoft Imaging and Jpeg in TIFF", by Andy
2000.02.07 15:43 "Re: Microsoft Imaging and Jpeg in TIFF", by Joris Van Damme
2000.02.08 19:40 "Re: Microsoft Imaging and Jpeg in TIFF", by Andy
2000.02.08 19:45 "Re: Microsoft Imaging and Jpeg in TIFF", by Joris Van Damme
2000.02.07 13:45 "Re: Microsoft Imaging and Jpeg in TIFF", by Chris Hanson
2000.02.07 14:34 "Re: Microsoft Imaging and Jpeg in TIFF", by Bruce Cameron
2000.02.07 15:39 "Re: Microsoft Imaging and Jpeg in TIFF", by Joris Van Damme
2000.02.08 16:11 "Re: Microsoft Imaging and Jpeg in TIFF", by Kevin D. Quitt
2000.02.03 01:55 "Re: Microsoft Imaging and Jpeg in TIFF", by Tom Lane
2000.02.03 11:10 "Re: Microsoft Imaging and Jpeg in TIFF", by Andy
2000.02.04 09:32 "Re: Microsoft Imaging and Jpeg in TIFF", by Andy

2000.02.04 09:32 "Re: Microsoft Imaging and Jpeg in TIFF", by Andy

Hello,

So I guess my question is: What should Ri be?

Given unsigned image width, rows per strip, and samples per pixel (1 or 3), and unknown unsigned variable Ri (JPEGRestartInterval):

if(width%8 != 0 ) {
    Ri=(width+(8-(width%8)))*rowsperstrip/64;
} else {
    Ri=width*rowsperstrip/64;
}
if(samplesperpixel==3){
    if(Ri & 0x01) { Ri++; }
    Ri=Ri/2;
}

This handles so far the images I am testing. So, if you come across some TIFF/J that it does not handle, then that is another case, and please say so.

Andy