HdrImageOptions
Inheritance: java.lang.Object
public class HdrImageOptions
The hdr image options
Constructors
| Constructor | Description |
|---|---|
| HdrImageOptions() |
Methods
| Method | Description |
|---|---|
| getSmoothFactor() | Gets the smooth factor. |
| setSmoothFactor(int value) | Sets the smooth factor. |
| getSampleCount() | Gets the sample count. |
| setSampleCount(int value) | Sets the sample count. |
| getAlignImages() | Gets a value indicating whether [align images]. |
| setAlignImages(boolean value) | Sets a value indicating whether [align images]. |
HdrImageOptions()
public HdrImageOptions()
getSmoothFactor()
public final int getSmoothFactor()
Gets the smooth factor.
Value: The smooth factor.
Returns: int - the smooth factor.
Example: The example shows how HDR processing is carried out.
String image1 = "DSC_6912.JPG";
String image2 = "DSC_6913.JPG";
String image3 = "DSC_6914.JPG";
boolean align = true;
String resultFilePath = image1 + "_result.jpg";
RasterImage[] images = new RasterImage[3];
images[0] = (RasterImage)Image.load(image1);
images[1] = (RasterImage)Image.load(image2);
images[2] = (RasterImage)Image.load(image3);
try
{
HdrImageOptions hdrOptions = new HdrImageOptions();
hdrOptions.setSampleCount(100);
hdrOptions.setSmoothFactor(200);
hdrOptions.setAlignImages(align);
int[] pixels = HdrProcessor.process(images, hdrOptions);
try (PngImage image = new PngImage(images[0].getWidth(), images[0].getHeight()))
{
image.saveArgb32Pixels(image.getBounds(), pixels);
image.save(resultFilePath);
}
}
finally
{
for (RasterImage image : images)
{
image.close();
}
}
setSmoothFactor(int value)
public final void setSmoothFactor(int value)
Sets the smooth factor.
Value: The smooth factor.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | int | the smooth factor. |
Example: The example shows how HDR processing is carried out.
String image1 = "DSC_6912.JPG";
String image2 = "DSC_6913.JPG";
String image3 = "DSC_6914.JPG";
boolean align = true;
String resultFilePath = image1 + "_result.jpg";
RasterImage[] images = new RasterImage[3];
images[0] = (RasterImage)Image.load(image1);
images[1] = (RasterImage)Image.load(image2);
images[2] = (RasterImage)Image.load(image3);
try
{
HdrImageOptions hdrOptions = new HdrImageOptions();
hdrOptions.setSampleCount(100);
hdrOptions.setSmoothFactor(200);
hdrOptions.setAlignImages(align);
int[] pixels = HdrProcessor.process(images, hdrOptions);
try (PngImage image = new PngImage(images[0].getWidth(), images[0].getHeight()))
{
image.saveArgb32Pixels(image.getBounds(), pixels);
image.save(resultFilePath);
}
}
finally
{
for (RasterImage image : images)
{
image.close();
}
}
getSampleCount()
public final int getSampleCount()
Gets the sample count.
Value: The sample count.
Returns: int - the sample count.
Example: The example shows how HDR processing is carried out.
String image1 = "DSC_6912.JPG";
String image2 = "DSC_6913.JPG";
String image3 = "DSC_6914.JPG";
boolean align = true;
String resultFilePath = image1 + "_result.jpg";
RasterImage[] images = new RasterImage[3];
images[0] = (RasterImage)Image.load(image1);
images[1] = (RasterImage)Image.load(image2);
images[2] = (RasterImage)Image.load(image3);
try
{
HdrImageOptions hdrOptions = new HdrImageOptions();
hdrOptions.setSampleCount(100);
hdrOptions.setSmoothFactor(200);
hdrOptions.setAlignImages(align);
int[] pixels = HdrProcessor.process(images, hdrOptions);
try (PngImage image = new PngImage(images[0].getWidth(), images[0].getHeight()))
{
image.saveArgb32Pixels(image.getBounds(), pixels);
image.save(resultFilePath);
}
}
finally
{
for (RasterImage image : images)
{
image.close();
}
}
setSampleCount(int value)
public final void setSampleCount(int value)
Sets the sample count.
Value: The sample count.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | int | the sample count. |
Example: The example shows how HDR processing is carried out.
String image1 = "DSC_6912.JPG";
String image2 = "DSC_6913.JPG";
String image3 = "DSC_6914.JPG";
boolean align = true;
String resultFilePath = image1 + "_result.jpg";
RasterImage[] images = new RasterImage[3];
images[0] = (RasterImage)Image.load(image1);
images[1] = (RasterImage)Image.load(image2);
images[2] = (RasterImage)Image.load(image3);
try
{
HdrImageOptions hdrOptions = new HdrImageOptions();
hdrOptions.setSampleCount(100);
hdrOptions.setSmoothFactor(200);
hdrOptions.setAlignImages(align);
int[] pixels = HdrProcessor.process(images, hdrOptions);
try (PngImage image = new PngImage(images[0].getWidth(), images[0].getHeight()))
{
image.saveArgb32Pixels(image.getBounds(), pixels);
image.save(resultFilePath);
}
}
finally
{
for (RasterImage image : images)
{
image.close();
}
}
getAlignImages()
public final boolean getAlignImages()
Gets a value indicating whether [align images].
Value: true if [align images]; otherwise, false.
Returns: boolean - a value indicating whether [align images].
Example: The example shows how HDR processing is carried out.
String image1 = "DSC_6912.JPG";
String image2 = "DSC_6913.JPG";
String image3 = "DSC_6914.JPG";
boolean align = true;
String resultFilePath = image1 + "_result.jpg";
RasterImage[] images = new RasterImage[3];
images[0] = (RasterImage)Image.load(image1);
images[1] = (RasterImage)Image.load(image2);
images[2] = (RasterImage)Image.load(image3);
try
{
HdrImageOptions hdrOptions = new HdrImageOptions();
hdrOptions.setSampleCount(100);
hdrOptions.setSmoothFactor(200);
hdrOptions.setAlignImages(align);
int[] pixels = HdrProcessor.process(images, hdrOptions);
try (PngImage image = new PngImage(images[0].getWidth(), images[0].getHeight()))
{
image.saveArgb32Pixels(image.getBounds(), pixels);
image.save(resultFilePath);
}
}
finally
{
for (RasterImage image : images)
{
image.close();
}
}
setAlignImages(boolean value)
public final void setAlignImages(boolean value)
Sets a value indicating whether [align images].
Value: true if [align images]; otherwise, false.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | boolean | a value indicating whether [align images]. |
Example: The example shows how HDR processing is carried out.
String image1 = "DSC_6912.JPG";
String image2 = "DSC_6913.JPG";
String image3 = "DSC_6914.JPG";
boolean align = true;
String resultFilePath = image1 + "_result.jpg";
RasterImage[] images = new RasterImage[3];
images[0] = (RasterImage)Image.load(image1);
images[1] = (RasterImage)Image.load(image2);
images[2] = (RasterImage)Image.load(image3);
try
{
HdrImageOptions hdrOptions = new HdrImageOptions();
hdrOptions.setSampleCount(100);
hdrOptions.setSmoothFactor(200);
hdrOptions.setAlignImages(align);
int[] pixels = HdrProcessor.process(images, hdrOptions);
try (PngImage image = new PngImage(images[0].getWidth(), images[0].getHeight()))
{
image.saveArgb32Pixels(image.getBounds(), pixels);
image.save(resultFilePath);
}
}
finally
{
for (RasterImage image : images)
{
image.close();
}
}