Permalink
Browse files

- added experimental EXIF decoding when reading JPEG files.

  • Loading branch information...
1 parent f0960b1 commit f7450478e1b5716c80039a8a697f5818bdcffbb1 Tony Cook committed Dec 7, 2005
Showing with 1,451 additions and 5 deletions.
  1. +1 −0 Changes
  2. +8 −0 Imager.xs
  3. +3 −0 MANIFEST
  4. +11 −3 Makefile.PL
  5. +1,299 −0 imexif.c
  6. +10 −0 imexif.h
  7. +27 −0 jpeg.c
  8. +60 −1 lib/Imager/Files.pod
  9. +32 −1 t/t101jpeg.t
  10. BIN testimg/exiftest.jpg
View
@@ -1207,6 +1207,7 @@ Revision history for Perl extension Imager.
- add AUTHOR, REVISION.
- add smoke test for nearest_color filter
- added integer overflow checks to many memory allocation calls
+- added experimental EXIF decoding when reading JPEG files.
=================================================================
View
@@ -888,6 +888,12 @@ i_int_hlines_dump(i_int_hlines *hlines) {
#endif
+#ifdef IMEXIF_ENABLE
+#define i_exif_enabled() 1
+#else
+#define i_exif_enabled() 0
+#endif
+
MODULE = Imager PACKAGE = Imager::Color PREFIX = ICL_
Imager::Color
@@ -2107,6 +2113,8 @@ i_readjpeg_wiol(ig)
myfree(iptc_itext);
}
+int
+i_exif_enabled()
#endif
View
@@ -53,6 +53,8 @@ hlines.c Manage sets of horizontal line segments
image.c
image.h
imagei.h
+imexif.c Experimental JPEG EXIF decoding
+imexif.h
img16.c
imgdouble.c Implements double/sample images
imio.h
@@ -196,6 +198,7 @@ testimg/comp4.tif 4-bit/pixel paletted TIFF
testimg/comp4bad.tif corrupted 4-bit/pixel paletted TIFF
testimg/comp8.bmp Compressed 8-bit/pixel BMP
testimg/comp8.tif 8-bit/pixel paletted TIFF
+testimg/exiftest.jpg Test image for EXIF parsing
testimg/expected.gif
testimg/gimpgrad A GIMP gradient file
testimg/junk.ppm
View
@@ -30,14 +30,16 @@ my @disable;
my @incpaths;
my @libpaths;
my $noprobe;
+my $noexif;
GetOptions("help" => \$help,
"enable=s" => \@enable,
"disable=s" => \@disable,
"incpath=s", \@incpaths,
"libpath=s" => \@libpaths,
"noprobe" => \$noprobe,
"verbose|v" => \$VERBOSE,
- "nolog" => \$NOLOG);
+ "nolog" => \$NOLOG,
+ "noexif" => \$noexif);
if ($VERBOSE) {
print "Verbose mode\n";
@@ -49,6 +51,8 @@ if ($help) {
usage();
}
+my @defines;
+
if ($NOLOG) { print "Logging not compiled into module\n"; }
else {
push @defines, [ IMAGER_LOG => 1, "Logging system" ];
@@ -83,8 +87,6 @@ elsif (@disable) {
delete @formats{map { split /,/ } @disable};
}
-my @defines;
-
# Pick what libraries are used
if ($MANUAL) {
manual();
@@ -105,6 +107,11 @@ for my $frmkey (keys %formats) {
$F_OBJECT .= ' ' .$frm->{objfiles};
$lib_cflags .= ' ' .$frm->{cflags} if $frm->{cflags};
}
+unless ($noexif) {
+ print "EXIF support enabled\n";
+ push @defines, [ 'IMEXIF_ENABLE', 1, "Enable experimental EXIF support" ];
+ $F_OBJECT .= ' imexif.o';
+}
$F_INC = join ' ', map "-I$_", map / / ? qq{"$_"} : $_,
grep !exists $definc{$_}, @incs;
@@ -520,6 +527,7 @@ scalable. It also supports a variety of other fonts.
DOCS
code => \&freetype2_probe,
};
+
# Make fix indent
for (keys %formats) { $formats{$_}->{docs} =~ s/^\s+/ /mg; }
}
Oops, something went wrong.

0 comments on commit f745047

Please sign in to comment.