Package org.jpedal.images
Class SamplingFactory
java.lang.Object
org.jpedal.images.SamplingFactory
This class provides options to set the sampling level and apply a sharpening kernel.
By default the sharpening level is set to high.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intcurrent setting - do not set directlystatic final int(default setting) high will agressively reduce images bigger than twice their drawn size at 100% so a image which appears as 100x100 on the PDF but whose raw images is 250x250 will be stored as 125x125 image and not a 250x250 imagestatic final int(default setting) high will agressively reduce images bigger than twice their drawn size at 100% so a image which appears as 100x100 on the PDF but whose raw images is 250x250 will be stored as 125x125 image and not a 250x250 imagestatic booleancurrent setting - do not set directlystatic booleanstatic final intmedium will make sure images larger than page are reduced in size (often large scanned tiffs)static final intmedium will make sure images larger than page are reduced in size (often large scanned tiffs)static intdo nothingstatic final intdo not use down-sampling on printingstatic final intuse down-sampling on printing (which is default) -
Method Summary
Modifier and TypeMethodDescriptionstatic double[][]static voidsetDownsampleMode(int newLevel) PDFs contain images which may often be much larger than the actual space they occupy and they are reduced to fit the space
alters image sampling to speed up program and reduce memory with the strategies high, medium, none, enable_printing, disable_printingstatic voidsetDownsampleMode(String newLevel) PDFs contain images which may often be much larger than the actual space they occupy and they are reduced to fit the space
alters image sampling to speed up program and reduce memory in with the strategies "high","medium", "none", "enable_printing", "disable_printing"static voidsetSharpenKernel(double[][] userKernel) allow user to over-ride default setting and set their own 3x3 kernel to sharpen down-sampled images
-
Field Details
-
none
public static int nonedo nothing -
medium
public static final int mediummedium will make sure images larger than page are reduced in size (often large scanned tiffs)- See Also:
-
high
public static final int high(default setting) high will agressively reduce images bigger than twice their drawn size at 100% so a image which appears as 100x100 on the PDF but whose raw images is 250x250 will be stored as 125x125 image and not a 250x250 image- See Also:
-
print_enable
public static final int print_enableuse down-sampling on printing (which is default)- See Also:
-
print_disable
public static final int print_disabledo not use down-sampling on printing- See Also:
-
mediumAndSharpen
public static final int mediumAndSharpenmedium will make sure images larger than page are reduced in size (often large scanned tiffs)- See Also:
-
highAndSharpen
public static final int highAndSharpen(default setting) high will agressively reduce images bigger than twice their drawn size at 100% so a image which appears as 100x100 on the PDF but whose raw images is 250x250 will be stored as 125x125 image and not a 250x250 image- See Also:
-
downsampleLevel
public static int downsampleLevelcurrent setting - do not set directly -
isPrintDownsampleEnabled
public static boolean isPrintDownsampleEnabledcurrent setting - do not set directly -
kernelSharpen
public static boolean kernelSharpen
-
-
Method Details
-
setDownsampleMode
PDFs contain images which may often be much larger than the actual space they occupy and they are reduced to fit the space
alters image sampling to speed up program and reduce memory in with the strategies "high","medium", "none", "enable_printing", "disable_printing"- Parameters:
newLevel- A String value of image sampling strategies
-
setDownsampleMode
public static void setDownsampleMode(int newLevel) PDFs contain images which may often be much larger than the actual space they occupy and they are reduced to fit the space
alters image sampling to speed up program and reduce memory with the strategies high, medium, none, enable_printing, disable_printing- Parameters:
newLevel- A String value of image sampling strategies
-
setSharpenKernel
public static void setSharpenKernel(double[][] userKernel) allow user to over-ride default setting and set their own 3x3 kernel to sharpen down-sampled images- Parameters:
userKernel- Kernel used to sharpen image
-
getSharpenKernel
public static double[][] getSharpenKernel()
-