You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by da...@apache.org on 2012/05/26 14:48:28 UTC
svn commit: r1342891 - in /commons/proper/imaging/trunk/src/site: site.xml
xdoc/justification.xml xdoc/sampleusage.xml
Author: damjan
Date: Sat May 26 12:48:28 2012
New Revision: 1342891
URL: http://svn.apache.org/viewvc?rev=1342891&view=rev
Log:
Update website, fix some broken links and remove old code.
Jira issue key: IMAGING-5
Modified:
commons/proper/imaging/trunk/src/site/site.xml
commons/proper/imaging/trunk/src/site/xdoc/justification.xml
commons/proper/imaging/trunk/src/site/xdoc/sampleusage.xml
Modified: commons/proper/imaging/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/site/site.xml?rev=1342891&r1=1342890&r2=1342891&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/site/site.xml (original)
+++ commons/proper/imaging/trunk/src/site/site.xml Sat May 26 12:48:28 2012
@@ -28,7 +28,6 @@
<item name="Mailing Lists" href="/mail-lists.html"/>
<item name="Issue Tracking" href="/issue-tracking.html"/>
<item name="Source Repository" href="/source-repository.html"/>
- <item name="Documentation" href="http://cwiki.apache.org/SANSELAN/"/>
<item name="Javadoc" href="/apidocs/index.html"/>
<item name="Download" href="/download_imaging.cgi"/>
</menu>
Modified: commons/proper/imaging/trunk/src/site/xdoc/justification.xml
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/site/xdoc/justification.xml?rev=1342891&r1=1342890&r2=1342891&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/site/xdoc/justification.xml (original)
+++ commons/proper/imaging/trunk/src/site/xdoc/justification.xml Sat May 26 12:48:28 2012
@@ -26,11 +26,10 @@ limitations under the License.
<p>
Why another image library? There are so many already.
- see: <a href="http://fightingquaker.com/sanselan/#references">http://fightingquaker.com/sanselan/#references</a>
</p>
<p>
- This library is Pure Java. Consequently it's slow, but perfectly portable.
+ Apache Commons Imaging is Pure Java. Consequently it's slow, but perfectly portable.
</p>
<p>
@@ -43,15 +42,15 @@ limitations under the License.
<p>
Most other libraries offer little or incomplete support for ICC Profiles.
- Sanselan can extract and (simply) parse embedded ICC Profiles.
- Moreover, sanselan applies the icc profile by default, coverting read images to sRGB.
+ Commons Imaging can extract and (simply) parse embedded ICC Profiles.
+ Moreover, it applies the ICC profile by default, coverting read images to sRGB.
This means images are color-corrected by default.
see: <a href="http://en.wikipedia.org/wiki/International_Color_Consortium">http://en.wikipedia.org/wiki/International_Color_Consortium</a>,
<a href="http://en.wikipedia.org/wiki/SRGB">http://en.wikipedia.org/wiki/SRGB</a>
</p>
<p>
- Sanselan also lets you read in image info (ie. width, height or colorspace) and metadata without
+ Commons Imaging also lets you read in image info (ie. width, height or colorspace) and metadata without
"reading" the entire image. It presents image info and metadata in a format-neutral manner.
It also gives easy, structured access to format-specific info.
</p>
@@ -69,7 +68,7 @@ limitations under the License.
<p>
Ultimately, other libraries didn't quite fill my requirements, though there are many good ones out there.
- What's really called for is a free, portable, feature complete library that ISN'T pure Java
+ What could be interesting is to get a free, portable, feature complete library that ISN'T pure Java
- ie. one that uses JNI, at least for JPEG, anyhow. The obvious solution would be a JNI wrapper
around libtiff, libjpeg, libpng, libgif/libungif, etc. imageloader uses this approach, but
is unfinished.
@@ -80,15 +79,15 @@ limitations under the License.
</p>
<p>
- Sanselan also includes a number of useful functions such as guess an image's format by examining its "magic numbers" (header info).
+ Commons Imaging also includes a number of useful functions such as guess an image's format by examining its "magic numbers" (header info).
</p>
<p>
- Sanselan aims to be transparent. There are no hidden buffers to dispose, no blocking calls, no native memory to free.
+ Commons Imaging aims to be transparent. There are no hidden buffers to dispose, no blocking calls, no native memory to free.
</p>
<p>
- The ColorConversions class offers methods to convert between the following color spaces: CIE-L*CH°, CIE-L*ab, CIE-L*uv,
+ The ColorConversions class offers methods to convert between the following color spaces: CIE-L*CH�, CIE-L*ab, CIE-L*uv,
CMY, CMYK, HSL, HSV, Hunter-Lab, RGB, XYZ and Yxy (algorithms courtesy of EasyRGB's).
see: <a href="http://www.easyrgb.com/">http://www.easyrgb.com/</a>
</p>
Modified: commons/proper/imaging/trunk/src/site/xdoc/sampleusage.xml
URL: http://svn.apache.org/viewvc/commons/proper/imaging/trunk/src/site/xdoc/sampleusage.xml?rev=1342891&r1=1342890&r2=1342891&view=diff
==============================================================================
--- commons/proper/imaging/trunk/src/site/xdoc/sampleusage.xml (original)
+++ commons/proper/imaging/trunk/src/site/xdoc/sampleusage.xml Sat May 26 12:48:28 2012
@@ -26,100 +26,18 @@ limitations under the License.
<subsection name="Example Code">
<p>
- Can be found in the source distribution in org.apache.commons.sanselan.examples package
+ Can be found in the source distribution in org.apache.commons.imaging.examples package
<ul>
- <li><a href="https://svn.apache.org/repos/asf/commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/sampleUsage/SampleUsage.java">SampleUsage.java</a>(includes the above code)</li>
- <li><a href="https://svn.apache.org/repos/asf/commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/sampleUsage/MetadataExample.java">MetadataExample.java</a>(illustrates how to find JPEG EXIF metadata such as GPS, date and time photo taken, etc.)</li>
- <li><a href="https://svn.apache.org/repos/asf/commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/sampleUsage/ImageWriteExample.java">ImageWriteExample.java</a>(illustrates how to write an image)</li>
- <li><a href="https://svn.apache.org/repos/asf/commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/sampleUsage/ImageReadExample.java">ImageReadExample.java</a>(illustrates how to read an image)</li>
+ <li><a href="https://svn.apache.org/repos/asf/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageWriteExample.java">ImageWriteExample.java</a>(illustrates how to write an image)</li>
+ <li><a href="https://svn.apache.org/repos/asf/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/ImageReadExample.java">ImageReadExample.java</a>(illustrates how to read an image)</li>
+ <li><a href="https://svn.apache.org/repos/asf/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/SampleUsage.java">SampleUsage.java</a>(various examples)</li>
+ <li><a href="https://svn.apache.org/repos/asf/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/MetadataExample.java">MetadataExample.java</a>(illustrates how to read JPEG EXIF metadata such as GPS, date and time photo taken, etc.)</li>
+ <li><a href="https://svn.apache.org/repos/asf/commons/proper/imaging/trunk/src/test/java/org/apache/commons/imaging/examples/WriteExifMetadataExample.java">WriteExifMetadataExample.java</a>(illustrates how to write JPEG EXIF metadata such as GPS, date and time photo taken, etc.)</li>
</ul>
</p>
</subsection>
-<subsection name="Sample Usage">
-<p>
-
-<source>
-import java.awt.Dimension;
-import java.awt.color.ICC_Profile;
-import java.awt.image.BufferedImage;
-import java.io.File;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Hashtable;
-import java.util.Map;
-
-import org.apache.commons.sanselan.*;
-
-// Code won't work unless these variables are properly initialized.
-// Sanselan works equally well with File, byte array or InputStream inputs.
-BufferedImage someImage = null;
-byte someBytes[] = null;
-File someFile = null;
-InputStream someInputStream = null;
-OutputStream someOutputStream = null;
-
-// The Sanselan class provides a simple interface to the library.
-
-// how to read an image:
-byte imageBytes[] = someBytes;
-BufferedImage image_1 = Sanselan.getBufferedImage(imageBytes);
-
-// methods of Sanselan usually accept files, byte arrays, or inputstreams as arguments.
-BufferedImage image_2 = Sanselan.getBufferedImage(imageBytes);
-File file = someFile;
-BufferedImage image_3 = Sanselan.getBufferedImage(file);
-InputStream is = someInputStream;
-BufferedImage image_4 = Sanselan.getBufferedImage(is);
-
-// Write an image.
-BufferedImage image = someImage;
-File dst = someFile;
-ImageFormat format = ImageFormat.IMAGE_FORMAT_PNG;
-Map optional_params = new Hashtable();
-Sanselan.writeImage(image, dst, format, optional_params);
-
-OutputStream os = someOutputStream;
-Sanselan.writeImage(image, os, format, optional_params);
-
-// get the image's embedded ICC Profile, if it has one.
-byte icc_profile_bytes[] = Sanselan.getICCProfileBytes(imageBytes);
-
-ICC_Profile icc_profile = Sanselan.getICCProfile(imageBytes);
-
-// get the image's width and height.
-Dimension d = Sanselan.getImageSize(imageBytes);
-
-// get all of the image's info (ie. bits per pixel, size, transparency, etc.)
-ImageInfo image_info = Sanselan.getImageInfo(imageBytes);
-
-if (image_info.getColorType() == ImageInfo.COLOR_TYPE_GRAYSCALE)
-System.out.println("Grayscale image.");
-if (image_info.getHeight() > 1000)
-System.out.println("Large image.");
-
-// try to guess the image's format.
-ImageFormat image_format = Sanselan.guessFormat(imageBytes);
-image_format.equals(ImageFormat.IMAGE_FORMAT_PNG);
-
-// get all metadata stored in EXIF format (ie. from JPEG or TIFF).
-// org.w3c.dom.Node node = Sanselan.getMetadataObsolete(imageBytes);
-IImageMetadata metdata = Sanselan.getMetadata(imageBytes);
-
-// print a dump of information about an image to stdout.
-Sanselan.dumpImageFile(imageBytes);
-
-// get a summary of format errors.
-FormatCompliance format_compliance = Sanselan
-.getFormatCompliance(imageBytes);
-</source>
-
-</p>
-
-</subsection>
-
</section>
-
</body>
</document>