"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "jpgfile.c" between
jhead-3.03.tar.gz and jhead-3.04.tar.gz

About: jhead is an Exif Jpeg header and thumbnail manipulation tool.

jpgfile.c  (jhead-3.03):jpgfile.c  (jhead-3.04)
skipping to change at line 243 skipping to change at line 243
process_COM(Data, itemlen); process_COM(Data, itemlen);
HaveCom = TRUE; HaveCom = TRUE;
} }
break; break;
case M_JFIF: case M_JFIF:
// Regular jpegs always have this tag, exif images have the exif // Regular jpegs always have this tag, exif images have the exif
// marker instead, althogh ACDsee will write images with both ma rkers. // marker instead, althogh ACDsee will write images with both ma rkers.
// this program will re-create this marker on absence of exif ma rker. // this program will re-create this marker on absence of exif ma rker.
// hence no need to keep the copy from the file. // hence no need to keep the copy from the file.
if (memcmp(Data+2, "JFIF\0",5)){
fprintf(stderr,"Header missing JFIF marker\n");
}
if (itemlen < 16){ if (itemlen < 16){
fprintf(stderr,"Jfif header too short\n"); fprintf(stderr,"Jfif header too short\n");
goto ignore; goto ignore;
} }
if (memcmp(Data+2, "JFIF\0",5)){
fprintf(stderr,"Header missing JFIF marker\n");
}
ImageInfo.JfifHeader.Present = TRUE; ImageInfo.JfifHeader.Present = TRUE;
ImageInfo.JfifHeader.ResolutionUnits = Data[9]; ImageInfo.JfifHeader.ResolutionUnits = Data[9];
ImageInfo.JfifHeader.XDensity = (Data[10]<<8) | Data[11]; ImageInfo.JfifHeader.XDensity = (Data[10]<<8) | Data[11];
ImageInfo.JfifHeader.YDensity = (Data[12]<<8) | Data[13]; ImageInfo.JfifHeader.YDensity = (Data[12]<<8) | Data[13];
if (ShowTags){ if (ShowTags){
printf("JFIF SOI marker: Units: %d ",ImageInfo.JfifHeader.Re solutionUnits); printf("JFIF SOI marker: Units: %d ",ImageInfo.JfifHeader.Re solutionUnits);
switch(ImageInfo.JfifHeader.ResolutionUnits){ switch(ImageInfo.JfifHeader.ResolutionUnits){
case 0: printf("(aspect ratio)"); break; case 0: printf("(aspect ratio)"); break;
case 1: printf("(dots per inch)"); break; case 1: printf("(dots per inch)"); break;
skipping to change at line 321 skipping to change at line 321
case M_SOF3: case M_SOF3:
case M_SOF5: case M_SOF5:
case M_SOF6: case M_SOF6:
case M_SOF7: case M_SOF7:
case M_SOF9: case M_SOF9:
case M_SOF10: case M_SOF10:
case M_SOF11: case M_SOF11:
case M_SOF13: case M_SOF13:
case M_SOF14: case M_SOF14:
case M_SOF15: case M_SOF15:
if (itemlen < 8){
fprintf(stderr,"Section too short\n");
break;
}
process_SOFn(Data, marker); process_SOFn(Data, marker);
break; break;
default: default:
// Skip any other sections. // Skip any other sections.
if (ShowTags){ if (ShowTags){
printf("Jpeg section marker 0x%02x size %d\n",marker, itemle n); printf("Jpeg section marker 0x%02x size %d\n",marker, itemle n);
} }
break; break;
} }
} }
 End of changes. 3 change blocks. 
3 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)