Package ch.bailu.gtk.lib.bridge
Klasse Image
java.lang.Object
ch.bailu.gtk.lib.bridge.Image
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic Pixbuf
load
(InputStream inputStream) Loads an image from the stream into Pixbufstatic Pixbuf
load
(InputStream inputStream, int width, int height) Loads an image from the stream into Pixbufstatic Pixbuf
load
(InputStream inputStream, int width, int height, boolean preserveAspectRatio) Loads an image from the stream into Pixbufstatic void
save
(OutputStream outputStream, Pixbuf pixbuf, String imageFormat) Convert pixbuf to an image format and write bytes to outputStream
-
Konstruktordetails
-
Image
public Image()
-
-
Methodendetails
-
load
Loads an image from the stream into Pixbuf- Parameter:
inputStream
- stream with image data- Gibt zurück:
- Pixbuf
- Löst aus:
IOException
-
load
Loads an image from the stream into Pixbuf- Parameter:
inputStream
- stream with image datawidth
- the width of the returned Pixbufheight
- the height of the returned Pixbuf- Gibt zurück:
- Pixbuf
- Löst aus:
IOException
-
load
public static Pixbuf load(InputStream inputStream, int width, int height, boolean preserveAspectRatio) throws IOException Loads an image from the stream into Pixbuf- Parameter:
inputStream
-width
- the width of the returned Pixbufheight
- the height of the returned PixbufpreserveAspectRatio
- `TRUE` to preserve the image's aspect ratio- Gibt zurück:
- Pixbuf
- Löst aus:
IOException
-
save
public static void save(OutputStream outputStream, Pixbuf pixbuf, String imageFormat) throws IOException Convert pixbuf to an image format and write bytes to outputStream- Parameter:
outputStream
- the image will be written to this streampixbuf
- pixbuf to convertimageFormat
- one of the following formats: "jpeg", "tiff", "png", "ico" or "bmp"- Löst aus:
IOException
-