Package totalcross.ui.image
Class ImageLoader
- java.lang.Object
-
- totalcross.ui.image.ImageLoader
-
public class ImageLoader extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static doubleJPEG_MEMORY_SAVING_DEFAULTDefault value for jpeg memory savings for instances of ImageLoader.doublejpegMemorySavingSet with a value between 0 and 1 to adjust the factor by which jpeg images are reduced during load to save memory when using GPU accelerated graphics (Settings.isOpenGLis true, otherwise this setting is ignored).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImageLoaderget(java.lang.String path)ImagegetImage(int desiredWidth, int desiredHeight)
-
-
-
Field Detail
-
JPEG_MEMORY_SAVING_DEFAULT
public static final double JPEG_MEMORY_SAVING_DEFAULT
Default value for jpeg memory savings for instances of ImageLoader.- See Also:
- Constant Field Values
-
jpegMemorySaving
public double jpegMemorySaving
Set with a value between 0 and 1 to adjust the factor by which jpeg images are reduced during load to save memory when using GPU accelerated graphics (Settings.isOpenGLis true, otherwise this setting is ignored). Values above 1 or below 0 are ignored, and 1 is used instead. Default value isJPEG_MEMORY_SAVING_DEFAULT
-
-
Method Detail
-
get
public static ImageLoader get(java.lang.String path) throws java.io.IOException
- Throws:
java.io.IOException
-
getImage
public Image getImage(int desiredWidth, int desiredHeight) throws java.io.IOException, ImageException
- Throws:
java.io.IOExceptionImageException
-
-