public class JSONImage extends JSONObject implements IImageProvider
DEFAULT_UPPER_CASE, NULL| Constructor and Description |
|---|
JSONImage() |
| Modifier and Type | Method and Description |
|---|---|
NullImageBehaviour |
getBehaviour()
Returns the behaviour to use when the stream of the image is null.
|
java.lang.Float |
getHeight(java.lang.Float defaultHeight)
Returns the height image with pixel unit.
|
ImageFormat |
getImageFormat()
Returns the image format.
|
java.lang.Float |
getWidth(java.lang.Float defaultWidth)
Returns the width image with pixel unit.
|
boolean |
isResize()
Returns true if call of
IImageProvider.setWidth(Float) must compute image height with ratio or if call of
IImageProvider.setHeight(Float) must compute image with with ratio and false otherwise. |
boolean |
isUseImageSize()
Returns true if image size comes from the image and false otherwise.
|
boolean |
isValid()
Returns true if the image provider is valid (ex : input stream not null) and false otherwise.
|
void |
setBehaviour(NullImageBehaviour behaviour)
Set the behaviour to use when the stream of the image is null.
|
void |
setHeight(java.lang.Float height)
Set the height image with pixel unit.
|
void |
setResize(boolean resize)
Set true if call of
IImageProvider.setWidth(Float) must compute image height with ratio or if call of
IImageProvider.setHeight(Float) must compute image with with ratio and false otherwise. |
void |
setSize(java.lang.Float width,
java.lang.Float height)
Set the width and height image with pixel unit.
|
void |
setUseImageSize(boolean useImageSize)
Set true if image size comes from the image and false otherwise.
|
void |
setWidth(java.lang.Float width)
Set the width image with pixel unit.
|
void |
write(java.io.OutputStream outputStream)
Write the binary data of the image in the given output stream.
|
accumulate, append, doubleToString, get, getBoolean, getDate, getDouble, getInt, getJSONArray, getJSONObject, getLong, getNames, getNames, getString, has, increment, isDate, isImage, isNull, isUpperCaseFirstChar, keys, length, names, numberToString, opt, optBoolean, optBoolean, optDouble, optDouble, optInt, optInt, optJSONArray, optJSONObject, optLong, optLong, optString, optString, put, put, put, put, put, put, put, putOnce, putOpt, quote, remove, stringToValue, testValidity, toJSONArray, toString, toString, valueToString, wrap, writeclear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuespublic void write(java.io.OutputStream outputStream)
throws java.io.IOException
IImageProviderwrite in interface IImageProviderjava.io.IOExceptionpublic ImageFormat getImageFormat()
IImageProvidergetImageFormat in interface IImageProviderpublic java.lang.Float getWidth(java.lang.Float defaultWidth)
throws java.io.IOException
IImageProvidergetWidth in interface IImageProviderdefaultWidth - as pixeljava.io.IOExceptionpublic void setWidth(java.lang.Float width)
IImageProvidersetWidth in interface IImageProviderpublic java.lang.Float getHeight(java.lang.Float defaultHeight)
throws java.io.IOException
IImageProvidergetHeight in interface IImageProviderdefaultHeight - as pixeljava.io.IOExceptionpublic void setHeight(java.lang.Float height)
IImageProvidersetHeight in interface IImageProviderpublic void setSize(java.lang.Float width,
java.lang.Float height)
IImageProvidersetSize in interface IImageProviderpublic boolean isUseImageSize()
IImageProviderisUseImageSize in interface IImageProviderpublic void setUseImageSize(boolean useImageSize)
IImageProvidersetUseImageSize in interface IImageProviderpublic void setResize(boolean resize)
IImageProviderIImageProvider.setWidth(Float) must compute image height with ratio or if call of
IImageProvider.setHeight(Float) must compute image with with ratio and false otherwise.setResize in interface IImageProviderpublic boolean isResize()
IImageProviderIImageProvider.setWidth(Float) must compute image height with ratio or if call of
IImageProvider.setHeight(Float) must compute image with with ratio and false otherwise.isResize in interface IImageProviderpublic NullImageBehaviour getBehaviour()
IImageProvidergetBehaviour in interface IImageProviderpublic void setBehaviour(NullImageBehaviour behaviour)
IImageProvidersetBehaviour in interface IImageProviderpublic boolean isValid()
IImageProviderisValid in interface IImageProviderCopyright © 2022. All Rights Reserved.