|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectPApplet
org.seltar.Bytes2Web.PostToWeb
org.seltar.Bytes2Web.ImageToWeb
public class ImageToWeb
| Field Summary | |
|---|---|
static int |
GIF
|
static int |
JPEG
|
static int |
PNG
|
static int |
TIFF
|
int |
type
|
| Constructor Summary | |
|---|---|
ImageToWeb(PApplet _papplet)
|
|
| Method Summary | |
|---|---|
byte[] |
getBytes()
Get the current screen's bytearray |
byte[] |
getBytes(PGraphics src)
Get the given PGraphics bytearray |
protected byte[] |
getBytesJPEG(java.awt.image.BufferedImage image)
Get the image as a jpeg byte array |
protected byte[] |
getBytesTIFF(PImage srcimg)
Get the image as a tiff byte array |
void |
post(java.lang.String project,
java.lang.String url,
java.lang.String filename,
boolean popup)
Special Image Post function, automatically adds the right extension |
void |
post(java.lang.String project,
java.lang.String url,
java.lang.String filename,
boolean popup,
byte[] bytes)
Special Image Post function, automatically adds the right extension Takes a byte array, from other images |
void |
save(java.lang.String filename)
Just save as a file |
void |
save(java.lang.String prefix,
boolean useDate)
Special Image Post function Adds date if requested, and automatically adds the right extension |
void |
save(java.lang.String filename,
byte[] bytes)
Just save a bytearray as a file |
void |
setType(int _type)
Set the filetype to save / post as |
| Methods inherited from class org.seltar.Bytes2Web.PostToWeb |
|---|
_post, _post, _save, _save, _save |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int type
public static final int JPEG
public static final int PNG
public static final int GIF
public static final int TIFF
| Constructor Detail |
|---|
public ImageToWeb(PApplet _papplet)
| Method Detail |
|---|
public void setType(int _type)
_type - the image type; ImageToWeb.JPEG, ImageToWeb.PNG, ImageToWeb.GIF, ImageToWeb.TIFF
public void post(java.lang.String project,
java.lang.String url,
java.lang.String filename,
boolean popup)
project - the project folderurl - url to the file that receives the datafilename - the filename it's supposed to save aspopup - wether or not to open the link with the file
public void post(java.lang.String project,
java.lang.String url,
java.lang.String filename,
boolean popup,
byte[] bytes)
project - the project folderurl - url to the file that receives the datafilename - the filename it's supposed to save aspopup - wether or not to open the link with the filebytes - the byte array to post
public void save(java.lang.String prefix,
boolean useDate)
prefix - the filenameuseDate - wether or not to prefix with a datepublic void save(java.lang.String filename)
filename - the filename to save as
public void save(java.lang.String filename,
byte[] bytes)
filename - the filename to save asbytes - the byte array to savepublic byte[] getBytes()
getBytes in class PostToWebpublic byte[] getBytes(PGraphics src)
src - the source graphicsprotected byte[] getBytesJPEG(java.awt.image.BufferedImage image)
image - BufferedImage to create the byte array fromBufferedImageprotected byte[] getBytesTIFF(PImage srcimg)
srcimg - PImage to create the byte array fromPImage
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||