|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.hd.d.pg2k.test.dev.MediaHandlerTest
public final class MediaHandlerTest
Tests of media-generation classes, eg for making thumbnails. This will test features such as transcoding, etc.
Also tests some relevant features of the ExhibitMIME class.
| Field Summary | |
|---|---|
(package private) static int |
bigImageHeight
Height of image big enough to make both thumbnails of; several times longest large thumbnail dimension. |
(package private) static int |
bigImageWidth
Width of image big enough to make both thumbnails of; several times longest large thumbnail dimension. |
private static java.util.Random |
rnd
Reasonable shared random-number generator. |
| Constructor Summary | |
|---|---|
MediaHandlerTest(java.lang.String name)
|
|
| Method Summary | |
|---|---|
private static java.awt.image.BufferedImage |
makeTestRGBIndexedColourBufferedImage(int width,
int height)
Create a byte-indexed fully-opaque RGB test image in memory. |
(package private) static java.awt.image.BufferedImage |
makeTestRGBTrueColourBufferedImage(int width,
int height)
Create a test RGB fully-opaque true-colour image in memory. |
(package private) static byte[] |
makeTestRGBTrueColourJPEGImage()
Make test JPEG encoded image of reasonably typical size; never null. |
void |
testColourReduction()
Test colour reduction of RGB and indexed images using ImageUtils routine. |
void |
testDimensionExtraction()
Test ability to accurately extract image dimensions from raw binaries. |
void |
testExhibitMIMEBasics()
Test some basic features of ExhibitMIME. |
void |
testGIFBasics()
Does some basic tests on the GIF handler. |
void |
testJP2Basics()
Does some basic tests on the JP2 (JPEG 2000) handler. |
void |
testJPGBasics()
Does some basic tests on the JPG (JPEG) handler. |
void |
testMetadataBasics()
Simple tests of exhibit metadata. |
void |
testPNGBasics()
Does some basic tests on the PNG handler. |
void |
testQuantizer()
Test that we can do colour reduction with the ImageMagik-derived Quantizer. |
void |
testThumbnailGeneration()
Test thumbnail generation of a given set of exhibit types. |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
| Methods inherited from class junit.framework.Assert |
|---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
static final int bigImageWidth
static final int bigImageHeight
private static final java.util.Random rnd
| Constructor Detail |
|---|
public MediaHandlerTest(java.lang.String name)
| Method Detail |
|---|
public void testExhibitMIMEBasics()
public void testJPGBasics()
throws java.lang.Exception
java.lang.Exception
public void testJP2Basics()
throws java.lang.Exception
java.lang.Exceptionpublic void testGIFBasics()
public void testPNGBasics()
public void testThumbnailGeneration()
throws java.lang.Exception
java.lang.Exception
public void testDimensionExtraction()
throws java.io.IOException
java.io.IOException
static java.awt.image.BufferedImage makeTestRGBTrueColourBufferedImage(int width,
int height)
This is an RGB image with a mixture of slowly-varying colours and noise.
Package-visible to be available to other tests.
private static java.awt.image.BufferedImage makeTestRGBIndexedColourBufferedImage(int width,
int height)
This is an RGB image some geometric patterns in a small number of colours (but more than one colour),# but that should be colour-reducable.
In passing this also tests a technique for generating indexed-colour images given RGB values.
static byte[] makeTestRGBTrueColourJPEGImage()
throws java.io.IOException
Will throw a jUnit exception if something unexpected happens.
Package-visible to be available to other tests.
java.io.IOException - if the JPEG encoder routines have difficultypublic void testColourReduction()
public void testQuantizer()
public void testMetadataBasics()
throws java.lang.Exception
java.lang.Exception
|
DHD Multimedia Gallery V1.57.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||