Import Upstream version 2.0.1+git20170416.3c2b769

parent c0157fdf
*.o
byteorder.h
comptime.c
exifprobe
\ No newline at end of file
language: c
os:
- linux
- osx
matrix:
include:
- os: linux
dist: trusty
- os: osx
osx_image: xcode7.2
- os: osx
osx_image: xcode8.1
- compiler: gcc
env: COMPILER=gcc
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-5
env: COMPILER=gcc-5
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-6
env: COMPILER=gcc-6
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
#- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ; fi
script:
- make
2.1.0:
* Fix crashers:
- https://github.com/hfiguiere/exifprobe/issues/5
- https://github.com/hfiguiere/exifprobe/issues/9
* Fix infinite loop due to premature end-of-file
(Issue https://github.com/hfiguiere/exifprobe/issues/3)
* Fix and infinite recursion for the Interop IFD parsing.
* Fix other fuzzing crashers (https://github.com/hfiguiere/exifprobe/issues/2).
* Added SRAW Type and Slice tags for CR2 files.
* Fix build on Windows (Issue https://github.com/hfiguiere/exifprobe/pull/1)
* Fix EXIFPROBE_OPTIONS (https://github.com/hfiguiere/exifprobe/issues/8)
* Added basic parsing of Panasonic RAW and RW2
* Updated DNG for 1.3 and 1.4 spec.
* Added Cinema DNG.
* Fixed RAF header parsing.
* Fix printing Software/Make/Model if it is less than 4 bytes (Found
in Sony and iPhone generated files).
* More Canon MakerNote decoding.
* Allow overriding CC at build time
* Various misc fixes.
2.0.1:
The following changes have been made since version 2.0.0:
......
......@@ -2,6 +2,8 @@
All of the files included in the EXIFPROBE distribution are:
Copyright (C) 2005 by Duane H. Hesser. All rights reserved.
Portions:
Copyright (C) 2011-2014 by Hubert Figuiere.
Some individual files may be covered by other copyrights.
......@@ -28,4 +30,5 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
Author: dhh@virtual-cafe.com <Duane H. Hesser>
Authors: Duane H. Hesser <dhh@virtual-cafe.com>
Hubert Figuière <hub@figuiere.net>
......@@ -2,8 +2,8 @@
# Makefile for EXIFPROBE image file probe
# Any compiler should do
CC=cc
CFLAGS=-DCOLOR -O
CC?=cc
CFLAGS=-DCOLOR -O -std=c99
# You probably don't need these
# CFLAGS=-DCOLOR -g -O -Dlint -Wall -Wno-long-long
......
This is a “fork” of exifprobe, a tool to probe Exif and other digital
camera RAW files.
Based on the 2.0.1 tarball as found in Debian.
Current maintainer: Hubert Figuière
Original maintainer: Duane H. Hesser
See file LICENSE.EXIFPROBE for the license
(basically a 3 clause BSD).
SECURITY NOTE
=============
This software hasn't been reviewed for security. Don't run it as
root. Beware running it on untrusted source data.
\ No newline at end of file
......@@ -178,7 +178,7 @@ main(int argc,char **argv)
{
if(show_bytes_decimal)
{
fseek(ifp,start_offset,0);
fseek(ifp,start_offset,SEEK_SET);
offset = start_offset;
i = 0;
printf("\n=============================================\nUnsigned byte - decimal:\n");
......@@ -197,7 +197,7 @@ main(int argc,char **argv)
if(show_bytes_hex)
{
printf("\n=============================================\nUnsigned byte - hex:\n");
fseek(ifp,start_offset,0);
fseek(ifp,start_offset,SEEK_SET);
offset = start_offset;
i = 0;
while((offset <= end_offset) && !feof(ifp) && !ferror(ifp))
......@@ -254,7 +254,7 @@ main(int argc,char **argv)
{
if(show_long_decimal)
{
fseek(ifp,start_offset,0);
fseek(ifp,start_offset,SEEK_SET);
offset = start_offset;
i = 0;
printf("\n=============================================\nUnsigned long - decimal:\n");
......@@ -273,7 +273,7 @@ main(int argc,char **argv)
}
if(show_long_hex)
{
fseek(ifp,start_offset,0);
fseek(ifp,start_offset,SEEK_SET);
offset = start_offset;
i = 0;
printf("\n=============================================\nUnsigned long - hex:\n");
......@@ -296,7 +296,7 @@ main(int argc,char **argv)
{
if(show_long_rational)
{
fseek(ifp,start_offset,0);
fseek(ifp,start_offset,SEEK_SET);
offset = start_offset;
i = 0;
printf("\n=============================================\nUnsigned long - rational:\n");
......@@ -319,7 +319,7 @@ main(int argc,char **argv)
}
if(show_short_rational)
{
fseek(ifp,start_offset,0);
fseek(ifp,start_offset,SEEK_SET);
offset = start_offset;
i = 0;
printf("\n=============================================\nUnsigned short rational:\n");
......@@ -363,7 +363,7 @@ read_ushort(FILE *inptr,unsigned short byteorder,unsigned long offset)
{
clearerr(inptr);
curoffset = ftell(inptr);
if((offset != HERE) && (fseek(inptr,offset,0) == -1))
if((offset != HERE) && (fseek(inptr,offset,SEEK_SET) == -1))
{
printf(" SEEK FAILED to read unsigned short at offset ");
printf("%lu",offset);
......@@ -405,7 +405,7 @@ read_ulong(FILE *inptr,unsigned short byteorder,unsigned long offset)
{
clearerr(inptr);
curoffset = ftell(inptr);
if((offset != HERE) && (fseek(inptr,offset,0) == -1))
if((offset != HERE) && (fseek(inptr,offset,SEEK_SET) == -1))
{
printf(" SEEK FAILED to read unsigned 32bit integer at offset ");
printf("%lu",offset);
......
......@@ -104,7 +104,7 @@ main(int argc,char **argv)
perror("\tbecause");
exit(3);
}
fseek(ifp,start_offset,0);
fseek(ifp,start_offset,SEEK_SET);
if(sizeleft < COPYBUFSIZE)
readsize = sizeleft;
else
......
......@@ -90,7 +90,7 @@ main(int argc,char **argv)
if((fp = fopen(filename,"r")) != (FILE *)0)
{
fseek(fp,start_offset,0);
fseek(fp,start_offset,SEEK_SET);
while(((highbyte = fgetc(fp)) != EOF) && (ftell(fp) <= end_offset))
{
if(highbyte != 0xff)
......@@ -111,14 +111,14 @@ main(int argc,char **argv)
//printf(" %#02x ",highbyte);
if(highbyte != 0xff)
{
fseek(fp,-1L,1);
fseek(fp,-1L,SEEK_CUR);
continue;
}
if(((lobyte = fgetc(fp)) != EOF) && (ftell(fp) <= end_offset))
{
if((lobyte < 0xc0) || (lobyte > 0xfe))
continue;
fseek(fp,-2L,1);
fseek(fp,-2L,SEEK_CUR);
if(tagloc == 0)
soi_index = -1;
++soi_index;
......
......@@ -48,6 +48,8 @@ extern unsigned long canon_customfunctions1D(FILE *,unsigned short,char *,
unsigned long,unsigned long,int);
extern unsigned long canon_sensorinfo(FILE *,unsigned short,char *,
unsigned long,unsigned long,int);
extern unsigned long canon_aspectinfo(FILE *,unsigned short,char *,
unsigned long,unsigned long,int);
extern unsigned long canon_pictureinfo(FILE *,unsigned short,char *,
unsigned long,unsigned long,int);
extern unsigned long canon_colorspace(FILE *,unsigned short,char *,
......
......@@ -60,7 +60,7 @@ process_ciff(FILE *inptr,struct fileheader *header,unsigned long fileoffset_base
heap_start = fileoffset_base + ciffheader->headerlength;
if(heaplength)
offset_table_end = fileoffset_base + heaplength;
else if(fseek(inptr,0L,2) == 0)
else if(fseek(inptr,0L,SEEK_END) == 0)
offset_table_end = ftell(inptr);
if(ferror(inptr) == 0)
{
......@@ -223,7 +223,8 @@ process_ciff_dir(FILE *inptr,unsigned long start_offset,unsigned long end_offset
else
{
print_tag_address(SECTION|ENTRY,max_dir_offset - 1,indent,"-");
tablename = tablename ? tablename : QSTRING;
/* tablename is dynamically allocated */
tablename = tablename ? tablename : strdup(QSTRING);
chpr += printf("</%s>\n",tablename);
print_tag_address(SECTION|ENTRY,end_offset - 4,indent,"-");
chpr += printf("%s location = @%lu",tablename,dircount_loc);
......@@ -1547,7 +1548,7 @@ is_compressed_crw(FILE *inptr,unsigned long start_offset,unsigned long imageleng
int count = 0;
int ch,lastch;
if((inptr) && (fseek(inptr,start_offset + 512,0) != -1))
if((inptr) && (fseek(inptr,start_offset + 512,SEEK_SET) != -1))
{
if(imagelength < maxcheck)
maxcheck = imagelength;
......
......@@ -64,4 +64,64 @@
#define DNGTAG_CurrentICCProfile 0xC691 /* 50833 */
#define DNGTAG_CurrentPreProfileMatrix 0xC692 /* 50834 */
/* DNG 1.2.0 */
#define DNGTAG_ColorimetricReference 0xC6BF /* 50879 */
#define DNGTAG_CameraCalibrationSignature 0xC6F3 /* 50931 */
#define DNGTAG_ProfileCalibrationSignature 0xC6F4 /* 50932 */
#define DNGTAG_ExtraCameraProfiles 0xC6F5 /* 50933 */
#define DNGTAG_AsShotProfileName 0xC6F6 /* 50934 */
#define DNGTAG_NoiseReductionApplied 0xC6F7 /* 50935 */
#define DNGTAG_ProfileName 0xC6F8 /* 50936 */
#define DNGTAG_ProfileHueSatMapDims 0xC6F9 /* 50937 */
#define DNGTAG_ProfileHueSatMapData1 0xC6FA /* 50938 */
#define DNGTAG_ProfileHueSatMapData2 0xC6FB /* 50939 */
#define DNGTAG_ProfileToneCurve 0xC6FC /* 50940 */
#define DNGTAG_ProfileEmbedPolicy 0xC6FD /* 50941 */
#define DNGTAG_ProfileCopyright 0xC6FE /* 50942 */
#define DNGTAG_ForwardMatrix1 0xC714 /* 50964 */
#define DNGTAG_ForwardMatrix2 0xC715 /* 50965 */
#define DNGTAG_PreviewApplicationName 0xC716 /* 50966 */
#define DNGTAG_PreviewApplicationVersion 0xC717 /* 50967 */
#define DNGTAG_PreviewSettingsName 0xC718 /* 50968 */
#define DNGTAG_PreviewPreviewSettingsDigest 0xC719 /* 50969 */
#define DNGTAG_PreviewPreviewColorSpace 0xC71A /* 50970 */
#define DNGTAG_PreviewPreviewDateTime 0xC71B /* 50971 */
#define DNGTAG_RawImageDigest 0xC71C /* 50972 */
#define DNGTAG_OriginalRawFileDigest 0xC71D /* 50973 */
#define DNGTAG_SubTileBlockSize 0xC71E /* 50974 */
#define DNGTAG_RowInterleaveFactor 0xC71F /* 50975 */
#define DNGTAG_ProfileLookTableDims 0xC725 /* 50981 */
#define DNGTAG_ProfileLookTableData 0xC726 /* 50982 */
/* DNG 1.3.0 */
#define DNGTAG_OpcodeList1 0xC740 /* 51008 */
#define DNGTAG_OpcodeList2 0xC741 /* 51009 */
#define DNGTAG_OpcodeList3 0xC74E /* 51022 */
#define DNGTAG_NoiseProfile 0xC761 /* 51041 */
/* Cinema DNG */
#define DNGTAG_TimeCodes 0xC763 /* 51043 */
#define DNGTAG_FrameRate 0xC764 /* 51044 */
#define DNGTAG_TStop 0xC772 /* 51058 */
#define DNGTAG_ReelName 0xC789 /* 51081 */
#define DNGTAG_CameraLabel 0xC7A1 /* 51105 */
/* DNG 1.4.0 */
#define DNGTAG_OriginalDefaultFinalSize 0xC791 /* 51089 */
#define DNGTAG_OriginalBestQualityFinalSize 0xC792 /* 51090 */
#define DNGTAG_OriginalDefaultCropSize 0xC793 /* 51091 */
#define DNGTAG_ProfileHueSatMapEncoding 0xC7A3 /* 51107 */
#define DNGTAG_ProfileLookTableEncoding 0xC7A4 /* 51108 */
#define DNGTAG_BaselineExposureOffset 0xC7A5 /* 51109 */
#define DNGTAG_DefaultBlackRender 0xC7A6 /* 51110 */
#define DNGTAG_NewRawImageDigest 0xC7A7 /* 51111 */
#define DNGTAG_RawToPreviewGain 0xC7A8 /* 51112 */
#define DNGTAG_DefaultUserCrop 0xC7B5 /* 51125 */
#endif /* DNGTAGS_INCLUDED */
......@@ -75,7 +75,10 @@ interpret_value(struct ifd_entry *entry_ptr,struct image_summary *summary_entry)
print_compression(entry_ptr->value);
break;
case TIFFTAG_PhotometricInterpretation:
print_photometric(entry_ptr->value,summary_entry->fileformat);
if (summary_entry)
{
print_photometric(entry_ptr->value,summary_entry->fileformat);
}
break;
case TIFFTAG_Orientation:
print_orientation(entry_ptr->value);
......
......@@ -453,7 +453,7 @@ process_jp2_xml(FILE *inptr,struct jp2box *box,int indent)
print_tag_address(VALUE,dataoffset,indent + 10,"=");
if((PRINT_VALUE))
{
if((inptr && (fseek(inptr,dataoffset,0)) != -1))
if((inptr && (fseek(inptr,dataoffset,SEEK_SET)) != -1))
{
while(size > 0ULL)
{
......@@ -503,7 +503,7 @@ process_jp2_jp2i(FILE *inptr,struct jp2box *box,int indent)
{
print_tag_address(SECTION,dataoffset,indent + 8,"=");
size = boxlength - 8;
if((inptr && (fseek(inptr,dataoffset,0)) != -1))
if((inptr && (fseek(inptr,dataoffset,SEEK_SET)) != -1))
{
while(size > 0ULL)
{
......
......@@ -83,7 +83,7 @@ main(int argc,char **argv)
while((file = *argv++))
{
inptr = fopen(file,"r");
inptr = fopen(file,"rb");
if(inptr == FNULL)
{
fprintf(stderr,"%s: failed to open file %s\n",Progname,file);
......@@ -107,7 +107,7 @@ main(int argc,char **argv)
}
else if(Start_offset)
{
if(fseek(inptr,Start_offset,0) == -1)
if(fseek(inptr,Start_offset,SEEK_SET) == -1)
{
fprintf(stderr,"%s: FAILED to seek to start offset %lu\n",
Progname,Start_offset);
......@@ -148,6 +148,7 @@ main(int argc,char **argv)
{
case ORF1_MAGIC:
case ORF2_MAGIC:
case RW2_MAGIC:
case TIFF_MAGIC:
ifd_offset = read_ulong(inptr,header->file_marker,HERE);
if(ifd_offset > filesize)
......@@ -178,6 +179,9 @@ main(int argc,char **argv)
case ORF2_MAGIC:
name = "ORF2";
break;
case RW2_MAGIC:
name = "RW2";
break;
case TIFF_MAGIC:
default:
break;
......@@ -261,7 +265,7 @@ main(int argc,char **argv)
}
if(status == 0)
{
max_offset = process_raf(inptr,Start_offset + 48,summary_entry,"RAF",0L);
max_offset = process_raf(inptr,Start_offset + 60,summary_entry,"RAF",0L);
if(max_offset > 0L)
status = 0;
}
......
......@@ -20,6 +20,7 @@ static char *ModuleId = "@(#) $Id: maker_agfa.c,v 1.19 2005/07/24 22:56:26 alex
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include "defs.h"
#include "summary.h"
......@@ -222,7 +223,7 @@ agfa1_offset_makervalue(FILE *inptr,unsigned short byteorder,
}
/* make certain we're at the end */
clearerr(inptr);
fseek(inptr,value_offset + count,0);
fseek(inptr,value_offset + count,SEEK_SET);
break;
case 0x0f00: /* Data */
if(at_offset && (PRINT_ENTRY))
......@@ -257,7 +258,7 @@ agfa1_offset_makervalue(FILE *inptr,unsigned short byteorder,
chpr += printf(" # UNDEFINED");
}
/* make certain we're at the end */
fseek(inptr,value_offset + count,0);
fseek(inptr,value_offset + count,SEEK_SET);
break;
default:
print_generic_offset_makervalue(inptr,byteorder,entry_ptr,
......
......@@ -28,6 +28,7 @@ static char *ModuleId = "@(#) $Id: maker_asahi.c,v 1.10 2005/07/24 22:56:26 alex
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include "defs.h"
#include "datadefs.h"
......@@ -297,7 +298,7 @@ asahi1_offset_makervalue(FILE *inptr,unsigned short byteorder,
}
/* make certain we're at the end */
clearerr(inptr);
fseek(inptr,value_offset + count,0);
fseek(inptr,value_offset + count,SEEK_SET);
break;
case 0x0e00: /* PrintIM (Epson Print Image matching) */
if(!at_offset && (PRINT_VALUE))
......@@ -403,7 +404,7 @@ asahi2_offset_makervalue(FILE *inptr,unsigned short byteorder,
}
/* make certain we're at the end */
clearerr(inptr);
fseek(inptr,value_offset + count,0);
fseek(inptr,value_offset + count,SEEK_SET);
break;
case 0x0e00: /* PrintIM (Epson Print Image matching) */
if(!at_offset && (PRINT_VALUE))
......
......@@ -25,6 +25,7 @@ static char *ModuleId = "@(#) $Id: maker_canon.c,v 1.29 2005/07/24 22:56:26 alex
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <time.h>
#include "defs.h"
......@@ -435,6 +436,35 @@ canon1_offset_makervalue(FILE *inptr,unsigned short byteorder,
}
clearerr(inptr);
break;
case 0x009a: /* AspectInfo */
if(at_offset)
{
if((PRINT_SECTION))
{
print_tag_address(SECTION,value_offset,indent,prefix);
chpr += printf("<%s> ",nameoftag);
chpr += printf("%lu entries",entry_ptr->count - 1);
}
}
else if((PRINT_VALUE))
chpr += printf("\'%lu entries\'",entry_ptr->count - 1);
if((PRINT_LONGNAMES))
tagprefix = fulldirname;
else
tagprefix = nameoftag;
setcharsprinted(chpr);
chpr = 0;
(void)canon_aspectinfo(inptr,byteorder,tagprefix,value_offset,
entry_ptr->count * sizeof(long),
indent + MEDIUMINDENT);
if(PRINT_SECTION)
{
print_tag_address(SECTION,value_offset + (entry_ptr->count * 2) - 1,
indent,prefix);
chpr += printf("</%s> ",nameoftag);
}
break;
default:
print_generic_offset_makervalue(inptr,byteorder,entry_ptr,fileoffset_base,
fulldirname,prefix,indent,
......@@ -514,12 +544,18 @@ maker_canon1_tagname(unsigned short tag,int model)
case 0x0009: tagname = "OwnerName"; break;
case 0x000a: tagname = "ColorInfoD30*"; break;
case 0x000c: tagname = "CameraSerialNo"; break;
case 0x000d: tagname = "CameraInfo"; break;
case 0x000e: tagname = "FileLength"; break;
case 0x000f: tagname = "CustomFunctions"; break;
case 0x0010: tagname = "UniqueModelId"; break; /* from dcraw */
case 0x0012: tagname = "PictureInfo"; break;
case 0x0013: tagname = "ThumbnailImageValidArea"; break;
case 0x0081: tagname = "JpegImage"; break;
case 0x0090: tagname = "CustomFunctions"; break;
case 0x0093: tagname = "FileInfo**"; break; /* exiftool shows wrong type */
case 0x0095: tagname = "LensName"; break;
case 0x0098: tagname = "CropInfo"; break;
case 0x009a: tagname = "AspectInfo"; break;
case 0x00a0: tagname = "ColorInfo**"; break; /* exiftool - wrong # values */
case 0x00a9: tagname = "WhiteBalanceTable"; break;
case 0x00ae: tagname = "ColorTemperature"; break;
......@@ -2984,7 +3020,7 @@ canon_sensorinfo(FILE *inptr,unsigned short byteorder,char *tagprefix,
if((PRINT_VALUE))
chpr += printf(" = %u",value);
break;
case 7:
case 7:
if((PRINT_TAGINFO))
chpr += printf(".%02d_%-26.26s",i,"SensorRightBorder");
if((PRINT_VALUE))
......@@ -2996,6 +3032,130 @@ canon_sensorinfo(FILE *inptr,unsigned short byteorder,char *tagprefix,
if((PRINT_VALUE))
chpr += printf(" = %u",value);
break;
case 9:
if((PRINT_TAGINFO))
chpr += printf(".%02d_%-26.26s",i,"BlackMaskLeftBorder");
if((PRINT_VALUE))
chpr += printf(" = %u",value);
break;
case 10:
if((PRINT_TAGINFO))
chpr += printf(".%02d_%-26.26s",i,"BlackMaskTopBorder");
if((PRINT_VALUE))
chpr += printf(" = %u",value);
break;
case 11:
if((PRINT_TAGINFO))
chpr += printf(".%02d_%-26.26s",i,"BlackMaskRightBorder");
if((PRINT_VALUE))
chpr += printf(" = %u",value);
break;
case 12:
if((PRINT_TAGINFO))
chpr += printf(".%02d_%-26.26s",i,"BlackMaskBottomBorder");
if((PRINT_VALUE))
chpr += printf(" = %u",value);
break;
default:
if((PRINT_TAGINFO))
chpr += printf(".%02d_%-26.26s",i,"Undefined");
if((PRINT_VALUE))
chpr += printf(" = %#x%u",value,value);
break;
}
chpr = newline(chpr);
}
}
setcharsprinted(chpr);
return(end_offset);
}
unsigned long
canon_aspectinfo(FILE *inptr,unsigned short byteorder,char *tagprefix,
unsigned long offset,unsigned long dirlength,int indent)
{
unsigned long count;
unsigned long end_offset;
unsigned long value;
int i;
int chpr = 0;
end_offset = offset + dirlength;
if(PRINT_SECTION)
{
chpr += printf(" length %lu",dirlength);
}
chpr = newline(chpr);
if((PRINT_ENTRY))
{
count = (dirlength / sizeof(long));
for(i = 0; i <= count; ++i)
{
value = read_ulong(inptr,byteorder,offset);
print_tag_address(ENTRY,offset,indent,"@");
if((PRINT_TAGINFO))
chpr += printf("%s",tagprefix);
offset += 4;
switch(i)
{
case 0:
if((PRINT_TAGINFO))
chpr += printf(".%02d_%-26.26s",i,"AspectRatio");
if((PRINT_VALUE))
chpr += printf(" = %#lx",value);
print_startvalue();
switch(value)
{
case 0:
chpr += printf("3:2");
break;
case 1:
chpr += printf("1:1");
break;
case 2:
chpr += printf("4:3");
break;
case 7:
chpr += printf("16:9");
break;
case 8:
chpr += printf("4:5");
break;
default:
printred("undefined");
break;
}
print_endvalue();
break;
case 1:
if((PRINT_TAGINFO))
chpr += printf(".%02d_%-26.26s",i,"CroppedImageWidth");
if((PRINT_VALUE))
chpr += printf(" = %lu",value);
break;
case 2:
if((PRINT_TAGINFO))
chpr += printf(".%02d_%-26.26s",i,"CroppedImageHeight");
if((PRINT_VALUE))
chpr += printf(" = %lu",value);
break;
case 3:
if((PRINT_TAGINFO))
chpr += printf(".%02d_%-26.26s",i,"CroppedImageLeft");
if((PRINT_VALUE))
chpr += printf(" = %lu",value);
break;
case 4:
if((PRINT_TAGINFO))
chpr += printf(".%02d_%-26.26s",i,"CroppedImageRight");
if((PRINT_VALUE))
chpr += printf(" = %lu",value);
break;
default:
if((PRINT_TAGINFO))
chpr += printf(".%02d_%-26.26s",i,"Undefined");
......
......@@ -28,6 +28,7 @@ static char *ModuleId = "@(#) $Id: maker_casio.c,v 1.19 2005/07/24 22:56:26 alex
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include "defs.h"
#include "datadefs.h"
......@@ -363,7 +364,7 @@ casio2_offset_makervalue(FILE *inptr,unsigned short byteorder,
}
/* make certain we're at the end */
clearerr(inptr);
fseek(inptr,value_offset + count,0);
fseek(inptr,value_offset + count,SEEK_SET);
break;
case 0x0e00: /* PrintIM (Epson Print Image matching) */
nameoftag = maker_tagname(entry_ptr->tag,make,model);
......
......@@ -23,6 +23,7 @@ static char *ModuleId = "@(#) $Id: maker_epson.c,v 1.22 2005/07/24 22:56:26 alex
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include "defs.h"
#include "datadefs.h"
......@@ -303,7 +304,7 @@ epson1_offset_makervalue(FILE *inptr,unsigned short byteorder,
}
/* make certain we're at the end */
clearerr(inptr);
fseek(inptr,value_offset + count,0);
fseek(inptr,value_offset + count,SEEK_SET);
break;
case 0x0e00: /* PrintIM (Epson Print Image matching) */
if(!at_offset && (PRINT_VALUE))
......@@ -350,7 +351,7 @@ epson1_offset_makervalue(FILE *inptr,unsigned short byteorder,
chpr += printf(" # UNDEFINED");
}
/* make certain we're at the end */
fseek(inptr,value_offset + count,0);
fseek(inptr,value_offset + count,SEEK_SET);
break;
default:
print_generic_offset_makervalue(inptr,byteorder,entry_ptr,
......
......@@ -20,6 +20,7 @@ static char *ModuleId = "@(#) $Id: maker_fujifilm.c,v 1.13 2005/07/24 22:56:26 a
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include "defs.h"
#include "datadefs.h"
#include "maker_datadefs.h"
......@@ -179,6 +180,7 @@ maker_fujifilm1_tagname(unsigned short tag,int model)
switch(tag)
{
case 0x0000: tagname = "Version"; break;
case 0x0010: tagname = "UniqueSerial"; break; /* Exiv2 */
case 0x1000: tagname = "Quality"; break;
case 0x1001: tagname = "Sharpness"; break;
case 0x1002: tagname = "WhiteBalance"; break;
......@@ -194,6 +196,15 @@ maker_fujifilm1_tagname(unsigned short tag,int model)
case 0x1300: tagname = "BlurWarning"; break;
case 0x1301: tagname = "FocusWarning"; break;
case 0x1302: tagname = "AEWarning"; break;
case 0x1401: tagname = "FilmMode"; break; /* Exiv2 */
case 0x1402: tagname = "DynamicRangeSettings"; break; /* Exiv2 */
case 0x1403: tagname = "DevelopmentDynamicRange"; break; /* Exiv2 */
case 0x1404: tagname = "FocalLengthMin"; break;
case 0x1405: tagname = "FocalLengthMax"; break;
case 0x1406: tagname = "MaxApertureAtMinFocal"; break;
case 0x1407: tagname = "MaxApertureAtMaxFocal"; break;
default: break;
}
setnotetagset(1);
......
......@@ -16,6 +16,7 @@ static char *ModuleId = "@(#) $Id: maker_generic.c,v 1.40 2005/07/24 21:34:37 al