rpms/metadata-extractor/devel import.log, NONE, 1.1 metadata-extractor-2.3.1-nosun.patch, NONE, 1.1 metadata-extractor.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
musuruan
musuruan at fedoraproject.org
Sat Nov 14 12:11:45 UTC 2009
- Previous message (by thread): rpms/openoffice.org/devel workspace.hb33patches1.patch, NONE, 1.1 openoffice.org.spec, 1.2071, 1.2072 openoffice.org-3.2.0.ooo59648.sw.scaling.patch, 1.1, NONE
- Next message (by thread): rpms/libvtemm/F-12 import.log, NONE, 1.1 libvtemm.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: musuruan
Update of /cvs/pkgs/rpms/metadata-extractor/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26906/devel
Modified Files:
.cvsignore sources
Added Files:
import.log metadata-extractor-2.3.1-nosun.patch
metadata-extractor.spec
Log Message:
First import
--- NEW FILE import.log ---
metadata-extractor-2_3_1-5_fc10:HEAD:metadata-extractor-2.3.1-5.fc10.src.rpm:1258200649
metadata-extractor-2.3.1-nosun.patch:
imaging/jpeg/JpegMetadataReader.java | 31 -------------------------------
metadata/SampleUsage.java | 20 --------------------
2 files changed, 51 deletions(-)
--- NEW FILE metadata-extractor-2.3.1-nosun.patch ---
commit f1681c3697d5cc51c282af35557b88f65b76e8d0
Author: Gabriel Ebner <ge at gabrielebner.at>
Date: Mon Oct 15 19:31:06 2007 +0200
Remove all references to the com.sun.image.codec.jpeg package.
diff --git a/src/com/drew/imaging/jpeg/JpegMetadataReader.java b/src/com/drew/imaging/jpeg/JpegMetadataReader.java
index aeacaa3..3fc08a7 100644
--- a/src/com/drew/imaging/jpeg/JpegMetadataReader.java
+++ b/src/com/drew/imaging/jpeg/JpegMetadataReader.java
@@ -25,7 +25,6 @@ import com.drew.metadata.exif.ExifReader;
import com.drew.metadata.iptc.IptcReader;
import com.drew.metadata.jpeg.JpegCommentReader;
import com.drew.metadata.jpeg.JpegReader;
-import com.sun.image.codec.jpeg.JPEGDecodeParam;
import java.io.File;
import java.io.IOException;
@@ -89,36 +88,6 @@ public class JpegMetadataReader
return metadata;
}
- public static Metadata readMetadata(JPEGDecodeParam decodeParam)
- {
- final Metadata metadata = new Metadata();
-
- /* We should only really be seeing Exif in _data[0]... the 2D array exists
- * because markers can theoretically appear multiple times in the file.
- */
- // TODO test this method
- byte[][] exifSegment = decodeParam.getMarkerData(JPEGDecodeParam.APP1_MARKER);
- if (exifSegment != null && exifSegment[0].length>0) {
- new ExifReader(exifSegment[0]).extract(metadata);
- }
-
- // similarly, use only the first IPTC segment
- byte[][] iptcSegment = decodeParam.getMarkerData(JPEGDecodeParam.APPD_MARKER);
- if (iptcSegment != null && iptcSegment[0].length>0) {
- new IptcReader(iptcSegment[0]).extract(metadata);
- }
-
- // NOTE: Unable to utilise JpegReader for the SOF0 frame here, as the decodeParam doesn't contain the byte[]
-
- // similarly, use only the first Jpeg Comment segment
- byte[][] jpegCommentSegment = decodeParam.getMarkerData(JPEGDecodeParam.COMMENT_MARKER);
- if (jpegCommentSegment != null && jpegCommentSegment[0].length>0) {
- new JpegCommentReader(jpegCommentSegment[0]).extract(metadata);
- }
-
- return metadata;
- }
-
private JpegMetadataReader()
{
}
diff --git a/src/com/drew/metadata/SampleUsage.java b/src/com/drew/metadata/SampleUsage.java
index e1b1a3b..a28dafa 100644
--- a/src/com/drew/metadata/SampleUsage.java
+++ b/src/com/drew/metadata/SampleUsage.java
@@ -21,9 +21,6 @@ import com.drew.imaging.jpeg.JpegProcessingException;
import com.drew.imaging.jpeg.JpegSegmentReader;
import com.drew.metadata.exif.ExifReader;
import com.drew.metadata.iptc.IptcReader;
-import com.sun.image.codec.jpeg.JPEGCodec;
-import com.sun.image.codec.jpeg.JPEGDecodeParam;
-import com.sun.image.codec.jpeg.JPEGImageDecoder;
import java.awt.image.BufferedImage;
import java.io.File;
@@ -87,23 +84,6 @@ public class SampleUsage
} catch (JpegProcessingException jpe) {
System.err.println("error 3a");
}
-
- // Approach 4
- // This approach is the slowest, because it decodes the Jpeg image. Of
- // course you now have a decoded image to play with. In some instances
- // this will be most appropriate.
- try {
- JPEGImageDecoder jpegDecoder = JPEGCodec.createJPEGDecoder(new FileInputStream(jpegFile));
- BufferedImage image = jpegDecoder.decodeAsBufferedImage();
- // now you can use the image
- JPEGDecodeParam decodeParam = jpegDecoder.getJPEGDecodeParam();
- Metadata metadata = JpegMetadataReader.readMetadata(decodeParam);
- printImageTags(4, metadata);
- } catch (FileNotFoundException e) {
- System.err.println("error 4a");
- } catch (IOException e) {
- System.err.println("error 4b");
- }
}
private void printImageTags(int approachCount, Metadata metadata)
--- NEW FILE metadata-extractor.spec ---
Name: metadata-extractor
Version: 2.3.1
Release: 5%{?dist}
Summary: JPEG metadata extraction framework
Group: Development/Libraries
# Read upstream homepage for license information
License: Public Domain
URL: http://www.drewnoakes.com/code/exif/
Source0: http://www.drewnoakes.com/code/exif/releases/%{name}-%{version}-src.jar
# Patch provided by Gabriel Ebner to remove all references to the
# com.sun classes. Package builds with a free java implementation now.
Patch0: %{name}-2.3.1-nosun.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: jpackage-utils
BuildRequires: java-devel
BuildRequires: ant
BuildRequires: ant-junit
Requires: jpackage-utils
Requires: java
%description
Java based metadata extraction library for JPEG images with support for Exif
and Iptc metadata segments, including manufacturer specific metadata of
several digital camera models.
%package javadoc
Summary: Javadocs for %{name}
Group: Documentation
Requires: %{name} = %{version}-%{release}
Requires: jpackage-utils
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q -c
%patch0 -p1
# Remove pre-built JAR and class files
find -name '*.jar' -exec rm -f '{}' \;
find -name '*.class' -exec rm -f '{}' \;
# Use system junit
build-jar-repository -s -p Libraries junit
# Fix end-of-line encoding
sed -i 's/\r//' ChangeLog.txt
# Disable junit tests
sed -i 's/depends="clean, compile, test"/depends="clean, compile"/' build.xml
%build
ant dist-binaries javadoc
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_javadir}
cp -p Releases/%{name}-%{version}.jar \
$RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
# JAR alias
pushd $RPM_BUILD_ROOT%{_javadir}
ln -sf %{name}-%{version}.jar %{name}.jar
popd
# javadoc
mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -rp javadoc/* \
$RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
#javadoc alias
pushd $RPM_BUILD_ROOT%{_javadocdir}
ln -sf %{name}-%{version} %{name}
popd
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{_javadir}/%{name}-%{version}.jar
%{_javadir}/%{name}.jar
%doc ChangeLog.txt
%files javadoc
%defattr(-,root,root,-)
%{_javadocdir}/%{name}
%{_javadocdir}/%{name}-%{version}
%changelog
* Sun Oct 18 2009 Andrea Musuruane <musuruan at gmail.com> 2.3.1-5
- Fixed javadoc package requires
- Created javadoc directory alias
* Sat Sep 12 2009 Andrea Musuruane <musuruan at gmail.com> 2.3.1-4
- Disabled junit tests because of bad coding in the tests themselves
* Sat Aug 22 2009 Andrea Musuruane <musuruan at gmail.com> 2.3.1-3
- Used a different workaround as suggested by Guido Grazioli to make
junit tests complete successfully
* Fri Aug 14 2009 Andrea Musuruane <musuruan at gmail.com> 2.3.1-2
- Created JAR alias
- Used a patch to make junit tests complete successfully
* Sun Aug 02 2009 Andrea Musuruane <musuruan at gmail.com> 2.3.1-1
- First release
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/metadata-extractor/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- .cvsignore 11 Nov 2009 03:38:40 -0000 1.1
+++ .cvsignore 14 Nov 2009 12:11:43 -0000 1.2
@@ -0,0 +1 @@
+metadata-extractor-2.3.1-src.jar
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/metadata-extractor/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sources 11 Nov 2009 03:38:41 -0000 1.1
+++ sources 14 Nov 2009 12:11:44 -0000 1.2
@@ -0,0 +1 @@
+b2f8d9ade3cc8008ed41ad62c1e80bc2 metadata-extractor-2.3.1-src.jar
- Previous message (by thread): rpms/openoffice.org/devel workspace.hb33patches1.patch, NONE, 1.1 openoffice.org.spec, 1.2071, 1.2072 openoffice.org-3.2.0.ooo59648.sw.scaling.patch, 1.1, NONE
- Next message (by thread): rpms/libvtemm/F-12 import.log, NONE, 1.1 libvtemm.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list